Skip to Content.
Sympa Menu

freetds - Re: dbsqlexec

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Brian Bruns <camber AT ais.org>
  • To: TDS Development Group <freetds AT franklin.oit.unc.edu>
  • Subject: Re: dbsqlexec
  • Date: Wed, 25 Oct 2000 22:40:24 -0400 (EDT)



Ok, I just checked it out. dbsqlok() returns SUCCEED which is then
returned by dbsqlexec(). The reason is that under TDS 4.2 the next token
would be an error token and return FAIL. TDS 5.0 uses a EED token and
needs to be processed entirely to determine its type (informational or
error).

I've fixed the code and put a new regression test (dblib/unittests/t0020)
to check for the correct behaviour. It should show up in CVS is the next
couple of minutes.

Brian

On Wed, 25 Oct 2000, Kent Scott wrote:

> 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?
>
> ---
> You are currently subscribed to freetds as: [camber AT ais.org]

> To unsubscribe, forward this message to $subst('Email.Unsub')
>





  • dbsqlexec, Kent Scott, 10/25/2000
    • <Possible follow-up(s)>
    • Re: dbsqlexec, Brian Bruns, 10/25/2000

Archive powered by MHonArc 2.6.24.

Top of Page