Re: [Sqlrelay-discussion] adabas_d & odbc
Brought to you by:
mused
|
From: Marie F. <ma...@vt...> - 2008-02-08 16:26:01
|
Well, it doesn't seem to be quite odbc 2.0 also - it returned
SQL_INVALID_HANDLE for SQLColAttributes (odbc 2.0) but seems to be fine with
SQLColAttribute (odbc 3.0).
Even stranger, the readme.txt says "ODBC Standard 3.5 Core Level 1".
Is there someone else out there using sqlrelay with adabas?
About SQL_COLUMN_AUTO_UNIQUE_VALUE:
I'm using unixODBC 2.2.12, which #defines SQL_DESC_AUTO_UNIQUE_VALUE
in sqlext.h as SQL_COLUMN_AUTO_INCREMENT, but has nothing in the source
about SQL_COLUMN_AUTO_UNIQUE_VALUE.
--
marie
----- Original Message -----
From: "David Muse" <dav...@fi...>
To: "Discussion of topics related to SQL Relay"
<sql...@li...>
Sent: Friday, February 08, 2008 4:59 PM
Subject: Re: [Sqlrelay-discussion] adabas_d & odbc
> That is unusual. I imagine that it means that adabas's odbc driver
> doesn't implement the newer ODBC API. It would be good if SQL Relay
> could detect this or at least give you an option in the config file to
> select whether to use the odbc 3.0 or 2.0 api.
>
> I'm not sure what's going on with SQL_COLUMN_AUTO_UNIQUE_VALUE though,
> what version of unixODBC are you using?
>
> David Muse
> dav...@fi...
>
>
> On Fri, 2008-02-08 at 12:04 +0200, Marie Fischer wrote:
>> Hello all,
>>
>> I have been trying to get sqlrelay to work with an Adabas_D database
>> (version 11 or 12)through ODBC connection (unixODBC). I could access the
>> database with isql and perl DBD::Adabas module, but would get segfaults
>> with
>> sqlrelay or even the odbctest from sqlrelay/bench. Sqlrelay worked fine
>> with
>> MySQL over ODBC connection.
>>
>> Finally, by trial and error, I seem to have gotten a working setup. I
>> commented out the code between "#if (ODBCVER >= 0x0300)" and "#else"
>> (didn't
>> want to mess with #defines) in odbcconnection.C - thus using the code for
>> older ODBCVER. The only exception was in odbccursor::executeQuery, where
>> I
>> had to use SQLColAttribute instead of SQLColAttributes.
>>
>> I guess this is just some quirk of Adabas's odbclib, but maybe my
>> experience
>> is helpful to someone else struggling with the same problem.
>>
>> BTW, there seems to be a small bug in odbccursor::executeQuery, at least
>> my
>> compiler complained about not knowing SQL_COLUMN_AUTO_UNIQUE_VALUE.
>> @@ -846,7 +846,7 @@
>> // autoincrement
>> #ifdef SQL_DESC_AUTO_UNIQUE_VALUE
>> erg=SQLColAttributes(stmt,i+1,
>> - SQL_COLUMN_AUTO_UNIQUE_VALUE,
>> + SQL_DESC_AUTO_UNIQUE_VALUE,
>> NULL,0,NULL,
>> (SQLINTEGER
>> *)&(col[i].autoincrement));
>> if (erg!=SQL_SUCCESS &&
>> erg!=SQL_SUCCESS_WITH_INFO)
>> {
>>
>> rgds,
>>
>
>
>
> __________________________________________________
> D O T E A S Y - "Join the web hosting revolution!"
> http://www.doteasy.com
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> Sqlrelay-discussion mailing list
> Sql...@li...
> https://lists.sourceforge.net/lists/listinfo/sqlrelay-discussion
>
|