Re: EUSQL UPDATE Query (I can't figure out why this isn't working)
- Posted by Matt Lewis <matthewwalkerlewis at yahoo.com> Aug 03, 2004
- 539 views
robby1066 wrote: > > > Hi there, I'm working on a win32lib application that uses an EUSQL database. > It seems > like everything is working correcly until I run an update query to change an > already > existing record. > > After trying to narrow down the problem (I'm not getting an error message, > just a silent > failure), I determined that I can use and update query on a single field, but > not on > multiple fields for the row selected in the where clause. > > Basically for a table called DOCBANK that has the following structure: > > KEY as Autonumber > TITLE as Text > DESC as Text > > I can get these statements to work: > run_sql("UPDATE DOCBANK SET DOCBANK.TITLE = 'NEW TITLE' WHERE (KEY = 16)") > and > run_sql("UPDATE DOCBANK SET DOCBANK.DESC = 'UPDATED DESCRIPTION' WHERE (KEY = > 16)") > > But this won't work: > run_sql("UPDATE DOCBANK SET DOCBANK.TITLE = 'NEW TITLE', DOCBANK.DESC = > 'UPDATED DESCRIPTION' > WHERE (KEY = 16)") > > Again, no error message, just the first field updates, and not the second. > I've used SQL before in some php apps, and I'm PRETTY sure that my sql is > correct, > but I could be wrong. I just wanted to make sure there wasn't something I had > missed > in the documentation about EUSQL. Yes, this is a bug. Thanks for finding it. I've just posted an update to the Recent User Contributions page, so it should be up there soon. Alternatively, I also updated my page: http://www14.brinkster.com/matthewlewis/projects.html Matt Lewis