|
|
User login
Feeds |
Update SQL statement doesn't work
|
|||||
| Tue, 2005-04-26 06:09 | |
|
Hi All,
I`m trying to update a table in my database using the following code _LIT(KSQLUpdate," UPDATE ConfigSettings SET Source=%S, Target=%S, Audi=%d" ); TBuf< 100> * tmpText=new(ELeave) TBuf< 100> (); CleanupStack::PushL(tmpText); tmpText-> Format(KSQLUpdate,& (iModel-> Source()),& (iModel-> Target()),iModel-> Audi); iEngineDB.Execute(*tmpText); CleanupStack::PopAndDestroy(tmpText); Whenever I run this code I get an error saying Bad request. I have gone through several other posts and all of them have used a SELECT SQL query within a view in order to update data within the table. Is the usage of Update SQL Statement wrong here or do I have to use the Update statement differently? Is the updation of table only allowed through SELECT SQL query? Can`t I use the update statement directly similar to the INSERT statement? Any help in this regard will be greatly appreciated. Thanks & regards, Asheesh |
|
Forum posts: 34
For quality Symbian idling, join #symbian at irc.freenode.net
Forum posts: 58
I was able to solve the problem. Yes, it was due to the missing quotes for the characters and also a unwanted parentheses.
Also it isn't necessary to have a where clause in the update statement,
but the single quote clause did help.
Thanks for your help, marsten.
Regards,
Asheesh