OpenDBX

for Project:

Open Database abstraction layer

Register as a new user

Task #24 — ODBC problem in windows with certain options

Attached to Project — OpenDBX
Opened by Mariano Martinez Peck (MarianoPeck) - Thursday, 15 Oct 2009, 10:10pm
Last edited by Norbert Sendetzky (nose) - Thursday, 3 Dec 2009, 10:02pm
Bug Report Medium
Backend Normal
Closed 1.4.x
Norbert Sendetzky (nose) 1.4.x
Windows 100% complete
Norbert: I need to make ODBC to work in Windows. I am trying your dlls from 1.4.4 but i am still having the same problem I had at that time. It doesn't matter which ODBC driver I use, I always have the same problem. It is even before OpenDBX uses the DSN I said in "host" variable.

I ALWAYS have the error "option type out of range" (translated from spanish to english). The problem seems to be:

-2719: Option type out of range

ODBC Error. A function was called with an invalid value for the argument fOption (e.g. the functions SQLSetConnectOption() or SQLTransact()).

The problem is odbc_odbx_bind, where you do:

gen->err = SQLSetConnectAttr( gen->conn, SQL_DEFAULT_TXN_ISOLATION, (SQLPOINTER) SQL_TXN_READ_COMMITTED, SQL_IS_UINTEGER );
if( !SQL_SUCCEEDED( gen->err ) )
{
return -ODBX_ERR_BACKEND;
}


when I could put the printf that time, I got this values

SQL_TXN_READ_COMMITTED: 2
SQL_IS_UINTEGER: -5

I would appreciate you give me some more lines to print everything you need.

The thing is that as this line is BEFORE the SQLConnect I ALWAYS have that error.

I give you more information: I create a ODBC datasource to an SQL Server database and the ODBC test is ok. It uses the driver C:\WINDOWS\system32\sqlsrv32.dll and the C:\WINDOWS\system32\odbc32.dll. If I remove sqlsrv32.dll and run this test, I have an error. Then I run the OpenDBX tests and I got what I told you. Look at the screenshot I attach. There you can see the specification of the datasource, the successfully result of the test, and the failure of opendbx. The message is in spanish.


But when I run the OpenDBX tests, the ODBC it is using is C:\WINDOWS\system32\odbc.dll (not C:\WINDOWS\system32\odbc32.dll). In addition, I can the test even removing sqlsrv32.dll or odbc32.dll and there is no dll error. So...those dlls are not being used. Anyway, odbc32.dll and odbc.dll are exactly the same.

Even weird...if I remove odbc.dll (whih is needed) I get the famous windows popup saying he cant find the dll but after pressing "ok", openDBX continues and there is where I get a problem I told you. This is weird, because after a problem like that one, it should exit, not continue....

I am completely lost.

I even took a clean PC but I have the same problem.

Thanks

Mariano

Closed by  Norbert Sendetzky (nose)
Date:  Saturday, 5 Dec 2009, 12:14pm.
Reason for closing:   Fixed
Additional comments about closing:  Will be part of OpenDBX 1.4.5

Comments (5) | Attachments (0) | Related Tasks (0/0) | Notifications (2) | Reminders (0) | History |

These users will receive detailed notifications whenever this task changes.