Menu

#18 All SQLAlloc* -> SQLAllocHandle

open
None
5
2006-03-08
2006-02-28
No

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

Discussion

  • Nick Gorham

    Nick Gorham - 2006-03-08

    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?

     
  • Nick Gorham

    Nick Gorham - 2006-03-08
    • assigned_to: nobody --> lurcher
     
  • Alexander Ilyin

    Alexander Ilyin - 2006-03-10

    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.

     
  • Nick Gorham

    Nick Gorham - 2006-03-10

    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.

     
  • Alexander Ilyin

    Alexander Ilyin - 2006-03-10

    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.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.