Modern drivers should not implement SQLAllocStmt,
SQLAllocEnv and SQLAllocConnect because Driver Manager
should autotranslate the call to the SQLAllocHandle
Now we need to implement all 4 functions instead just
one SQLAllocHandle
I found that unixODBC DM doesn't do that. My driver didn't
have SQLAllocConnect etc functions. It had just
SQLAllocHandle. And it works with MS DM. But I found
problems with unixODBC & isql.
When I added SQLAllocConnect,SQLAllocStmt and SQLAllocEnv
to my driver isql gets working OK.
So you can check by yourself. Get any driver and comment out
this 3 funcs. Then try this driver with isql (which use this
funcs) and you get problems.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thats exactly what I did to check, and it seems to work
fine. The code the SQLConnect in the DriverManager dir will
check to see what comes back from the dlsym and what is
reported from SQLGetFunctions to decide what it can call.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
May be I got the problem because my driver has not the
SQLGetFunction and I don't put into the odbcinst.ini
DisableGetFunctions=1
So your algorithm can't determine that driver hasn't such
functions and call it?
BTW it will be nice to add some docs with all possible
params in odbcinst.ini and odbc.ini because I found this
very useful DisableGetFunctions param only looking into the
sources and guessing that it is what I want.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Logged In: YES
user_id=7184
I am not sure what you mean, I don't believe you do need to
implement the ODBC2 alloc calls, the DM should do this mapping.
Have you a example where this is not working as expected?
Logged In: YES
user_id=871710
I found that unixODBC DM doesn't do that. My driver didn't
have SQLAllocConnect etc functions. It had just
SQLAllocHandle. And it works with MS DM. But I found
problems with unixODBC & isql.
When I added SQLAllocConnect,SQLAllocStmt and SQLAllocEnv
to my driver isql gets working OK.
So you can check by yourself. Get any driver and comment out
this 3 funcs. Then try this driver with isql (which use this
funcs) and you get problems.
Logged In: YES
user_id=7184
Thats exactly what I did to check, and it seems to work
fine. The code the SQLConnect in the DriverManager dir will
check to see what comes back from the dlsym and what is
reported from SQLGetFunctions to decide what it can call.
Logged In: YES
user_id=871710
May be I got the problem because my driver has not the
SQLGetFunction and I don't put into the odbcinst.ini
DisableGetFunctions=1
So your algorithm can't determine that driver hasn't such
functions and call it?
BTW it will be nice to add some docs with all possible
params in odbcinst.ini and odbc.ini because I found this
very useful DisableGetFunctions param only looking into the
sources and guessing that it is what I want.