Cannot use a select or any of the database statements in a multi-query prepare
Q:
I get the following exception when i try to execute the following query:
INSERT INTO days (depcode,studycode,batchnum) values (3,3,4);SELECT DBINFO( 'sqlca.sqlerrd1' )
FROM systables
WHERE tabid = 1;
Through ExecuteScalar()
.
ERROR:-555 MEssa开发者_如何学运维ge: [Informix .NET provider][Informix]Cannot use a select or any of the database statements in a multi-query prepare.
The statement text that is presented with this PREPARE statement has multiple statements divided by semicolons, and one is a SELECT, DATABASE, CREATE DATABASE, or CLOSE DATABASE statement. These statements must always be prepared as one-statement texts. Check the statement text string, and make sure that you intended multiple statements. If you did, revise the program to execute these four statement types alone.
Means, try to do the insert and the select in two separate query's.
精彩评论