Re: [Sqlrelay-discussion] adabas_d & odbc
Brought to you by:
mused
|
From: David M. <dav...@fi...> - 2008-02-08 15:16:25
|
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
|