Code: Select all
global globaldate, gConnectID
on preopencard
put "SELECT eventid,mothers_name,fsum,delivery_date FROM master where delivery_date = globaldate" into tQuery
put revDataFromQuery(,,gConnectID,tQuery) into tRecords
etc
-- Mark
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Code: Select all
global globaldate, gConnectID
on preopencard
put "SELECT eventid,mothers_name,fsum,delivery_date FROM master where delivery_date = globaldate" into tQuery
put revDataFromQuery(,,gConnectID,tQuery) into tRecords
etc
Awesome, thanks Bernard... I really appreciate the tip.Bernard wrote:I would do this:
put "SELECT eventid,mothers_name,fsum,delivery_date FROM master where delivery_date = '[[globaldate]]' " into tQueryTemplate
put merge(tQueryTemplate) into tQuery
The merge() function will substitute variables in your literal string, for the values in those variables.
I find all the fiddling about with & and quote too fiddly. This way, I can see right off in the IDE that I have got a well-formed statement (or command or URL). Then I can check that the subsequent substitution works, knowing that at least the text was well-formed before any subsequent substitution of values.