Skip to Content.
Sympa Menu

freetds - [freetds] Problem retrieveing results from a query with an IMAGE field

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Daniel A. Veiga" <dveiga AT advtechnology.com.ar>
  • To: freetds AT lists.ibiblio.org
  • Subject: [freetds] Problem retrieveing results from a query with an IMAGE field
  • Date: Mon, 2 Jun 2008 15:00:45 -0300 (ART)

Hi,
My name is Daniel. I'm a programmer at ADV Technology in Argentina.
I'm developing using FreeTDS and came into a problem when retrieving
results from a query that has an IMAGE field in a MSDE (SQL Server)
database.
I can reproduce the problem systematically:
- If no row has any data in the IMAGE field -> no problem
- When a field has something in the blob column I get an error
when trying to close the cursor (Linux Driver Manager log follows)

[ODBC][32484][SQLFreeStmt.c][140]
Entry:
Statement = 0x750380
Option = 0
[ODBC][32484][SQLFreeStmt.c][246]
Exit:[SQL_ERROR]

If I try to call SQLGetDiagRec to get extended information, the
result is SQL_NO_DATA (strange, should report something if the
previous function returned SQL_ERROR or SQL_SUCCESS_WITH_INFO)

If I ignore the error and release the Stmt handle, it succeeds,
but look al the log!

[ODBC][32484][SQLFreeHandle.c][372]
Entry:
Handle Type = 3
Input Handle = 0x750380
[ODBC][32484][SQLFreeHandle.c][471]
Exit:[SQL_SUCCESS]
DIAG [24000] [FreeTDS][SQL Server]Attempt to initiate a
new Adaptive Server operation with results pending

DIAG [24000] [FreeTDS][SQL Server]Attempt to initiate a
new Adaptive Server operation with results pending

Trying to alloc a new statement succeeds, but if you try to use
it you get:

Exit:[SQL_ERROR]
DIAG [24000] [FreeTDS][SQL Server]Invalid cursor state

Does anybody know what could be wrong?
Thanks,


Daniel






Archive powered by MHonArc 2.6.24.

Top of Page