Egbert Eissing a écrit :
Hi Egbert,
Ypur problem is in your SQL syntax.
>
> query=db.new_actionquery()
> insertString = "NewCD"
> query.set_sql("INSERT INTO CDDisk (CDName = " + insertString + ")")
> query.execute()
>
Standard SQL syntax for INSERT statement is:
INSERT INTO CDDisk (CDName,[other_field,...]
VALUES( insertString, [othervalue,...] )
while in your query you used UPDATE syntax which is:
UPDATE CDDisk SET CDName = 'New Name'
> Unfortunately, the Knoda docu is silent on inserting records under
> program control. A representative example would be welcome and useful.
> Thanks for any help
Well, when you directly use SQL statements, you should refer to your
database manuel, such as
http://dev.mysql.com/doc/refman/5.0/en/insert.html if using MySQL, or
postgreSQL syntax. On such simple queries, all current database
management actually use the same syntax.
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Hk-classes-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/hk-classes-discuss