I took your example, modified it, and entered it into the “pushButton…:QPushButton - clicked” option for my button.
Your example:
this.dataSource.sqlExecute(
'INSERT INTO "actor" ( "first_name", "last_name"

VALUES ( \'first_name\', \'last_name\' );' );[/code
I tried all the following. They did not work. The error message for each of them read:
Transactions - Add:: clicked:3: SyntaxError: Expected token ‘)’
NO SPACE AFTER BEGINNING ( NOR BEFORE ENDING )
this.dataSource.sqlExecute(
'INSERT INTO "Transactions" ("Amount", "Comment", "Credit", "Date", "Debit", "Name", "RefNo", "Stmt", "TransNo"
VALUES (0, \’ \’, \’5014\’, CURRENT_DATE, \’1000\’, \’KROGER\’, \’ \’, \’NO\’, NULL);' );[/code]
this.dataSource.sqlExecute(
'INSERT INTO "Transactions" ("Credit", "Date", "Debit", "Name"
VALUES (\’5014\’, CURRENT_DATE, \’1000\’, \’KROGER\’);' );[/code]
SPACE AFTER BEGINNING ( AND BEFORE ENDING )
this.dataSource.sqlExecute(
'INSERT INTO "Transactions" ( "Credit", "Date", "Debit", "Name" )
VALUES ( \’5014\’, CURRENT_DATE, \’1000\’, \’KROGER\’ ) ;' );[/code]
this.dataSource.sqlExecute(
'INSERT INTO "Transactions" ( "Credit", "Debit", "Name" )
VALUES ( \’5014\’, \’1000\’, \’KROGER\’ ) ;' );[/code]
this.dataSource.sqlExecute(
'INSERT INTO "Transactions" ( "Name" )
VALUES ( \’KROGER\’ ) ;' );[/code]
REMOVED [/code]
this.dataSource.sqlExecute(
'INSERT INTO "Transactions" ( "Name" )
VALUES ( \’KROGER\’ ) ;' );
✦ ✦ ✦ ✦ ✦ ✦
I did find the Template reference. Thanks. I read your “Note, there is an issue with quoting in the "Execute SQL..." template - it generates wrong escape characters, so it is necessary to fix them manually.” So, I did not try anything there. I am already having enough trouble with my INSERT INTO problem.
What am I still doing wrong?
Joe Hall