Skip to Content.
Sympa Menu

freetds - [freetds] Thanks to Patrick and Freddy, but still some suggestion for Freddy, Patrick and those who can't make iODBC and FreeTDS work together.

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Ou Liu" <ou AT qbt.com>
  • To: <freetds AT lists.ibiblio.org>
  • Subject: [freetds] Thanks to Patrick and Freddy, but still some suggestion for Freddy, Patrick and those who can't make iODBC and FreeTDS work together.
  • Date: Wed, 18 Dec 2002 14:13:16 -0500

Hi, everyone
Thanks to the work of Patrick and Freddy, now we can use iODBC and
FreeTDS
together. However still some very trivial problem:
1. For thos guys who frustrated at making iODBC and FreeTDS work
together:
Please do download the "newest" FreeTDS, I mean version higher than
1.102.Otherwise because the iODBC manager will suppose that some of function
have been implemented by the freetds' odbc driver which it doesn't.
And do use the patch of Patrick, otherwise you will have to go to the
connect.c and change it by yourself.
If you follow my suggestion, I can't see there is any problem to make
iODBC
and FreeTDS work together

2. For Freddy
I see you in version 1.103 try to let the SQLSetEnvAttr return a
SQL_SUCCESS when it was asked to set the version, but it is useless,
especially based on the patch of Patrick. Since by that the iODBC Manager
will think that the odbc driver of freetds is Version 3 and you will meet
problem when the iODBC Manager call the SQLGetStmtAttr in function
SQLAllocStmt located in the hstmt.c, at there the iODBC will first check the
version of the odbc driver, and by your code (of course you have commented
it out) it will think that the driver is of version 3. Then it will call the
SQLGetStmtAttr of yours, no matter what you do, here an error will appear:
(1) if you comment the code of SQLGetStmtAttr
(2) or you just let the SQLGetStmtAttr return an error.
In both occasion, the function will return a fail which will make the
odbctest abort.

3. For Patrick
In the function I just mentioned, namely SQLGetStmtAttr, there is some
codes like this:

----------------------------------------------------------------------------
-------------------
if (rc1 != SQL_SUCCESS && rc1 != SQL_SUCCESS_WITH_INFO)
{ /* no descriptor returned from the driver */
pstmt->type = 0;
MEM_FREE(pstmt);
for (i1 = 0; i1 < i + 1; i++)
{
pstmt->imp_desc[i1]->type = 0;
MEM_FREE(pstmt->imp_desc[i1]);
}
pstmt->type = 0;
MEM_FREE(pstmt);
pdbc->rc = SQL_ERROR;
LEAVE_HDBC (pdbc, SQL_ERROR);
}
----------------------------------------------------------------------------
-------------------

Here 'i++' should be i1++, otherwize it will loop forever. But I
really
don't know why the coder didn't use the j++ instead of this i1 which will
definitely lead to error sometimes. I will send you an email straightly.

4. For Freddy and other guys
Even after I have a connection to the MSSQL 2K database on a Windows
2K
machine, still I have some problem when fetching data, I do can fetch some
data, but seems as if I met a problem when I am fetching a big string.
If anybody met the same problem as me, could you please post your
problem
onto the mailing list.

Thank you
OU





Archive powered by MHonArc 2.6.24.

Top of Page