Database - Update from Data Entry/Query form

Jan Schenkel janschenkel at yahoo.com
Tue Nov 25 05:58:14 EST 2003


--- Melvin Cox <melcox at hotmail.com> wrote:
> Jan:
> 
> 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 
> all warnings.
> 
> 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 
> existing query?
> 
> I'm flabbergasted!
> 
> 
> 
> M.C.
> 

Hi Melvin,

I would get rid of the "0 = 0" bit in the WHERE
clause. And try from a button :
--
  put "UPDATE people SET mname = 'Joseph' " & \
      "WHERE pid = 'GILMORE,C' ;" into tQuery
  revExecuteSQL "SomeQuery", tQuery
--
(where SomeQuery is a query with the correct
connection info, and which is also set to remain open
until the stack closes)

If that doesn't work and you don't get an error,
there's something else in the way.
Out of curiosity, which database are you using ? If
it's MySQL, you should tick the 'Cache result set'
checbox in the Query Builder.

Jan Schenkel.

=====
"As we grow older, we grow both wiser and more foolish at the same time."  (La Rochefoucauld)

__________________________________
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard
http://antispam.yahoo.com/whatsnewfree


More information about the use-livecode mailing list