Skip to Content.
Sympa Menu

freetds - Re: [freetds] ODBC: error 100 from SQLGetDiagRec?

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Frediano Ziglio <freddyz77 AT tin.it>
  • To: FreeTDS <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] ODBC: error 100 from SQLGetDiagRec?
  • Date: 25 Jan 2003 13:39:56 +0100

Il sab, 2003-01-25 alle 02:11, Craig Davison ha scritto:
> Hi,
>
> I'm not all that familiar with ODBC but I think I've come across a problem
> with the freetds ODBC driver.
> Of course, the problem could be in my code or my ODBC driver (unixODBC
> 2.2.2).
>
> I'm using freetds 0.60, and the DB server is MS SQLServer 2000.
>
> When I run a query with SQLExecDirect or SQLExecute and it returns an
> error, I can't seem to get any details about the error with SQLGetDiagRec -
> it returns 100 (SQL_NO_DATA), and the error fields and error code are not
> returned.
> SQLGetDiagRec seems to work for an error from SQLConnect, however.
>
> I've enclosed an example program that uses SQLExecDirect. It tries to
> SELECT uid FROM master..sysusers (which should succeed) and then it tries
> to fail with SELECT uid FRO master..sysusers (which should fail with an
> error message, I would hope)
>
> You'll need to edit the SQLConnect line in main() to run it.

Fixed in CVS version (about a month ago). Error handling has been
completely rewritten after 0.60 (ie. SQLGetDiagRec and SQLGetDiagField
wasn't implemented in 0.60)

freddy77






Archive powered by MHonArc 2.6.24.

Top of Page