开发者

Cannot use a select or any of the database statements in a multi-query prepare

开发者 https://www.devze.com 2023-03-23 11:32 出处:网络
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\' )

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消