Database - Update from Data Entry/Query form
melcox at hotmail.com
Tue Nov 25 05:42:16 EST 2003
Thanks once again for your informed assistance.
Unfortunately, I can NOT get any update to run from my test application.
I have simplified my script to its barest elements, and have attempted to
run the revExecuteSQL statement with a hard coded SQL statement.
I have confirmed the correctness of the generated update statement, through
a 3rd Party isql utility, using the same user id and password.
The syntax appears correct: 'update people set mname = 'Joseph' where 0 = 0
and pid = 'GILMORE,C''
As there is absolutely NO sign of network activity, it appears that the SQL
is never sent to the database server. The database error log is clear of
My testing for errors via a "revDatabaseConnectResult" statement returns the
following message: "revdberr,invalid cursor id".
Question: Is it necessary to include a databaseID, when referencing an
----Original Message Follows----
There are basically two ways of updating the records
in the database: either by ticking the checbox "Update
after editing" in the "Database" pane of the Property
Inspector ; or by writing an UPDATE query like you did
(You could adapt your closeField handler for this
purpose, and build a custom property set to hold the
changed fields' new contents.)
Once you have collected the necessary information into
a query, you can execute it via :
revExecuteSQL <name of an existing query>, \
<the SQL query to execute>
There's no need to change an existing query ;
revExecuteSQL needs the name of an existing query
solely for its database connection information.
If you still get an error, there is probably something
wrong with the query.
Hope this helped,
"As we grow older, we grow both wiser and more foolish at the same time."
Say goodbye to busy signals and slow downloads with a high-speed Internet
connection! Prices start at less than $1 a day average.
https://broadband.msn.com (Prices may vary by service area.)
More information about the Use-livecode