dbsqlexec

Kent Scott kent at carmike.com
Wed Oct 25 15:13:18 EDT 2000


Anyone having problems with dbsqlexec always returning a SUCCEED?

I am using linux and I configured with :
--with-tdsver=7.0
--enable-msdblib

I am writing in c using dblib functions. I am purposely sending incorrect
sql stmts but dbsqlexec always returns SUCCEED even though the server is
responding with errors ( I have captured the packets).

code looks like this:

dbcmd(dbproc,"select * from (sales"); // purposely built incorrect stmt
return_code = dbsqlexec(dbproc);
if (return_code == SUCCEED)
   printf("SUCCEED\r\n");

the server is responding with :
"Line 1: Incorrect syntax near ')' "

but return_code always equals SUCCEED

any ideas?



More information about the FreeTDS mailing list