[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freetds
Subject:    [freetds] Re: More ODBC driver documentation desired
From:       Peter Harvey <pharvey () codebydesign ! com>
Date:       2002-02-05 6:20:49
[Download RAW message or body]

I have taken a closer look at the problem. It is starting to look like a 
    FreeTDS ODBC driver problem.

In the FreeTDS ODBC driver I changed this...

   _set_func_exists(pfExists,SQL_API_SQLBINDPARAM);

to this...

  _set_func_exists(pfExists,SQL_API_SQLBINDPARAMETER);

and the driver function now gets called. However; the FreeTDS driver now 
seg faults soon after that. It may have something to do with the 
incompat pointer assignment warning during compile. <doh>

Thats all the time I can spend on this right now so I am hoping someone 
else will pick up the bug or let it lie until I get more time.

Peter

BTW: I checked in the change.


Brian Bruns wrote:

> Peter,
> 
> My point was that CHECK_SQLBINDPARAM() basically just checks a field in 
> the structure set during SQLConnect(), so unixODBC is posting the 
> error before FreeTDS's SQLBindParameter() is ever called.  So, the 
> problem really has to be in SQLGetFunctions() or related calls.  We went 
> through this exact same thing during 2.0.x -> 2.1.0.  I thought we had 
> solved it, now I'm just confused.  If I get some time tommorow, I'll dl 
> 2.2.0 and put together a test case, that should nail it down.
> 
> Brian
> 
> On Mon, 4 Feb 2002, Peter Harvey wrote:
> 
> 
>>The problem does seem to be with a call to SQLBindParameter(). The 
>>FreeTDS driver always returns SQL_SUCCESS in this function so I have to 
>>think that the Driver Manager is returning the !SQL_SUCCESS.
>>
>>Brian, it sounds like you guys have been looking at a unixODBC trace 
>>which indicates this and more... something to effect that the DM is 
>>thinking that the driver lacks the function.
>>
>>Perhaps Nick can have a look at this since the DM itself is his baby... 
>>Nick?
>>
>>Here is a head-start...
>>
>>OpenLDAP : openldap.org
>>Source   : openldap-2.0.22/servers/slapd/back-sql
>>
>><schema-map.c>
>>  if ((rc=backsql_BindParamID(at_sth,1,&oc_id)) != SQL_SUCCESS)
>>   {
>>    Debug(LDAP_DEBUG_TRACE,"load_schema_map(): error binding param for 
>>at_query: \n",0,0,0);
>>    backsql_PrintErrors(si->db_env,dbh,at_sth,rc);
>>    return -1;
>>   }
>></schema-map.c>
>>
>><sql-wrap.c>
>>RETCODE backsql_BindParamID(SQLHSTMT sth,int par_ind,unsigned long *id)
>>{
>>
>>  return 
>>SQLBindParameter(sth,(SQLUSMALLINT)par_ind,SQL_PARAM_INPUT,SQL_C_ULONG,SQL_INTEGER,
>>          0,0,(SQLPOINTER)id,0,(SQLINTEGER*)NULL);
>>}
>></sql-wrap.c>
>>
>>Dan Melomedman wrote:
>>
>>
>>>Brian Bruns writes:
>>>
>>>
>>>>What version of unixODBC are you running? 
>>>>
>>>Very interesting. This is 2.2.0. Do you think it makes sense to try 
>>>iODBC before anything else?
>>>
>>>
>>It would be good if you stuck with unixODBC... at least give us a chance 
>>to correct any problem.
>>
>>Peter
>>
>>
>>
>>
>>---
>>You are currently subscribed to freetds as: [camber@ais.org]
>>To unsubscribe, forward this message to leave-freetds-113879Q@franklin.oit.unc.edu
>>
>>
> 
> 
> ---
> You are currently subscribed to freetds as: [pharvey@codebydesign.com]
> To unsubscribe, forward this message to leave-freetds-113879Q@franklin.oit.unc.edu
> 
> 
> 



---
You are currently subscribed to freetds as: [freetds@progressive-comp.com]
To unsubscribe, forward this message to leave-freetds-113879Q@franklin.oit.unc.edu
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic