[comp.sys.mac.hypercard] ORACLE, HC, cruft

gasp@bucse.bu.edu (Isaac Kohane) (03/24/90)

I've had a fair amount of experience hacking HC and using the HyperSQL
interface to ORACLE. Therefore, I was a little surprised and quite
embarrassed that I was unable to sleuth the following problem after
about 2 hours experimentation:

Symptom: I have to mouse a button three times to have a scrolling
field be updated with the retrieved data. If I only mouse the button
once, but issue a command from the msg box to display the global
variables in the scrolling field, it happens right away indicating
that the data was retrieved from ORACLE but that the same command from
within a script does not work (until invoked the third time).
AAAARGH!!! What gives?

Specifics: The script:

on retrievebuttonmoused
global foo,bar      

execsql "select foo,bar into :foo:,:bar: from tablename"
execsql "get next 1000 rows"

put spliceanddice(foo,bar) into cd fld scrollingfield
end retrievebuttonmoused

function spliceanddice a,b
  ...code to join the two fields line by line
 return a_joined_b
end spliceanddice


If I call spliceanddice from the msg box, the new values of the global
variables immediately appear in scrollingfield. However if I hit the
button, the old values of the globals stay until the third time the
button is hit.

Am I missing the obvious? Is it an ORACLE-HC interaction? Do I need to
start myself on benzodiazepines?


                                        -Z