Skip to Content.
Sympa Menu

freetds - RE: [freetds] Error: FreeTDS+WINE

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Lowden, James K" <LowdenJK AT bernstein.com>
  • To: 'FreeTDS Development Group' <freetds AT lists.ibiblio.org>
  • Subject: RE: [freetds] Error: FreeTDS+WINE
  • Date: Wed, 17 Sep 2003 14:21:12 -0400

> -----Original Message-----
> From: Rainer [mailto:sourceforge AT powered.net]
> Sent: September 16, 2003 4:05 PM
> >
> > A quick fix [...] would be to change
> > those 7 cases to return SQL_SUCCESS_WITH_INFO
>
> I've made the changes to the source code (odbc.c) as you
> suggested, and
> the error while running the application with wine has changed to:
> "Run-time error 40009: No current row".

Hmm. Not sure what's going on.

You issue the "EXECUTE dbo.spLicenca ..." query, and no rows are returned.
That procedure issues 7 queries that return no results (that's what the
successive DONEINPROC packets mean). Then you get a 1-column result set;
the column name is 'aux':

00d0 row information -> 81 01 00 00 00 |........ ........|
00e0 01 00 af 01 00 03 61 00-75 00 78 00
row data --> d1 01 00 30 |......a. u.x....0|

followed by 2 more DONEINPROC, a RETURNSTATUS, and a DONEPROC:

00f0 ff 11 00 c1 00 01 00 00-00 ff 01 00 db 00 00 00 |........ ........|
0100 00 00 79 00 00 00 00 fe-00 00 e0 00 00 00 00 00 |..y..... ........|

The row data show a one-byte integer whose value is 0x30.

The next thing in the log shows is a bunch of calls to SQLColAttribute(),
and there it ends.

The error message apparently comes from WINE; it doesn't come from FreeTDS
that I can see. One possible culprit: WINE tried to read
SQL_ATTR_ROW_NUMBER with SQLGetStmtAttr(). You might want to put a logging
statement there (odbc.c:2919) to see if it's returning zero.

It seems possible to me that the preceding queries that don't return results
might be confusing libtds and/or our ODBC driver, but that's just
speculation. I mention it only because there are other recent reports of
problems retrieving results after such a query. Cf. Steve Hanselman's
message last week, for instance.

Can you execute spLicenca under unixODBC's isql? If yes, then it's specific
to WINE (although it might still be a FreeTDS issue). If not, the problem
should be easier to isolate.

> Ok, some additional facts... right at the beginning of the
> log, it says
> "converting 0 bytes of SYBASE"... is freetds assuming that this is a
> sybase database? (while in fact its mssql2k).

That's spurious, nothing to worry about. It looks like tds_put_string() is
lying about its input length in the log. Thanks for pointing it out.

Regards,

--jkl
-----------------------------------------
The information contained in this transmission may contain privileged and
confidential information and is intended only for the use of the person(s)
named above. If you are not the intended recipient, or an employee or agent
responsible for delivering this message to the intended recipient, any
review, dissemination, distribution or duplication of this communication is
strictly prohibited. If you are not the intended recipient, please contact
the sender immediately by reply e-mail and destroy all copies of the original
message. Please note that we do not accept account orders and/or instructions
by e-mail, and therefore will not be responsible for carrying out such orders
and/or instructions.






Archive powered by MHonArc 2.6.24.

Top of Page