[Sqlrelay-discussion] adabas_d & odbc
Brought to you by:
mused
|
From: Marie F. <ma...@vt...> - 2008-02-08 10:05:27
|
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,
--
marie
|