IMPORTANT ANNOUNCEMENT

These forums were permanently set to read-only mode on July 20, 2022. From that day onwards, no new posting or comment is allowed on the site, but the historical content remains intact and searchable.

A new location for posting questions about PlanetPress Suite is now available:

OL Learn - PlanetPress Classic (opens in new tab)

Topic Options
#19083 - 02/07/08 10:20 AM email statements
seatec Offline
OL User

Registered: 02/01/05
Posts: 95
Loc: Clearwater
OK, i created a watc process that look in a folder for a filename. It takes the file and does a splitter for a word at a specific location.
I am doing a jobinfo 1 for a repname. Now i need to lookup the repname's email address in an access mdb file that i have living on the planet watch server. ther file is c:\estate\estate2k.mdb. it contains one table with two columns. the columns are repnum and email. whats the script look like to take the %1 and lookup the corresponging email in the table and then return the email value to %9.

here is waht i have so far.
dim strConnect, oDB
strConnect="DSN=estate;APP=PlanetPress Suite 5;DATABASE=c:\estate\estate2k.mdb;UID=user;PWD=pass"

' Initialize DB
set ODB = CreateObject("ADODB.Connection")
oDB.Open strConnect

Top
#19084 - 02/07/08 11:37 AM Re: email statements
Jobin.G Offline
Member

Registered: 03/15/04
Posts: 68
Loc: Qu
I guess that the command you need to know are how to read and write a Watch Job info in VB ?!?

Here they are :

Watch.GetJobInfo(Index: integer) : string
Watch.SetJobInfo(Index: integer, Value: string)

For the rest of your script, you got to perform a query on the correct table with the correct statement and put the result in your job info.

"Select email from table where repnum =" & Watch.GetJobInfo(1)

Assign the result to the job info 9 :
Watch.SetJobInfo(9, objQuery.email)


Here is an example of how to make such SQL statement using VBScript : External Link

Top