Conditional colours

This forum is Read Only . If you feel a thread should be added to the FAQ please contact a moderator

Re: Conditional colours

Postby Roj » Tue Aug 17, 2010 3:05 pm

Hi Adrian,
I created the control procedure as below: -

define global "gId" text 255 .

define "t" number .

-- to get all cars that are exactly a fortnight overdue


for COMPANYVEHICLES with NEXTMOTDUE = 01/09/2010 ;
gId := Regnum .
run document "motwarn14days" .
t := shellexecutea ( 0 , "open" , "c:\Motemail.vbs" , "" , "" , 0 ) .
end

and gave a test record a NEXTMOTDUE date of 01/09/2010 so that there would definately be a record to act on.

the export procedure is now this : -

define global "gID" text 255 .
for COMPANYVEHICLES with REGNUM = global gID ;
list records
EMAILADD ;
REGNUM .
end

export to "c:\Motemail.vbs" .
.items
strFrom = "enquiries@bowerselec.co.uk"
strServer = "server01.bowerselectrica.local"
strTo = @f[1,1]
strSub = "M.O.T. Test Warning"
strBody = "The M.O.T. Test for Vehicle"
strBody = strBody & Chr(10) & Chr(10)
strBody = @f[1,2]
strBody = strBody & Chr(10) & Chr(10)
strBody = "will expire in 14 days "
strBody = strBody & Chr(10) & Chr(10)
strBody = "Please arrange to have the vehicle tested"
set objEmail = CreateObject("CDO.Message")
objEmail.From = strFrom
objEmail.To = strTo
objEmail.Subject = strSub
objEmail.Textbody = strBody
objEmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
objEmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserver") = strServer
objEmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
objEmail.Configuration.Fields.Update
objEmail.Send
.end

i ran the control procedure and got some very wierd results! Ffenics locked up and the output from the procedures was spooled to my local printer!
file is created but still empty.

what have i done wrong now?
Roj.
Illegitemi non Carborundum.
Roj
 
Posts: 42
Joined: Wed Jul 30, 2008 2:44 pm
Has thanked: 0 time
Been thanked: 0 time
 
 
Previous

Return to Ffenics FAQ

Who is online

Users browsing this forum: No registered users and 1 guest

cron