fusongbaihai 发表于 2012-03-31 02:55

prepare执行BUG吗?

strcat(buffer,"jcsjk");

sprintf(str_cmd,"%s%s","select * from ",buffer,":systables into temp aa");
$prepareaa from $str_cmd
$execute aa


-410    Prepare statement failed or was not executed.

This EXECUTE statement refers to a statement id that has not been
prepared. Either no PREPARE statement was done, or one was done but
returned an error code. Review the program logic to ensure that a
statement is prepared and the PREPARE return code is checked. A
negative error code from PREPARE usually reflects an error in the
statement being prepared.



请问何解?

398407063俺在写一个,生成纯SQL的小工具。以免不同数据库造成语法不一样!

fusongbaihai 发表于 2012-03-31 03:03

另请教问题
sprintf(str_cmd,"%s%s","EXEC SQLconnect to ",buffer);
$prepareaa from $str_cmd;
$execute aa;

效果一样,请问有何解
-410    Prepare statement failed or was not executed

页: [1]
查看完整版本: prepare执行BUG吗?