Giter Site home page Giter Site logo

Comments (8)

TallTed avatar TallTed commented on July 17, 2024 1

@alinaliBQ — The trace functionality described is in the iODBC libraries, not in the Administrator app. You should find that editing or adding the described stanzas to the active odbc.ini and/or adding the described keywords and values to a fileDSN or to a DSN-less connect string, results in production of the requested logs.

Given the extra details you've just provided — that "During [your] tests, the issue with SQLBindParameter does not occur with OpenLink ODBC Administrator.app, only with libiodbc (installed using brew install libiodbc)." — I'm thinking that the Homebrew package may be outdated or have some other error (though it looks OK at first glance).

Please do be aware that Homebrew and other command-line tools can use the libraries installed with the iODBC Administrator.app (equivalent to the OpenLink ODBC Administrator.app), so this may be your fastest path to success, given your latest.

I'm sure our developers will also make more rapid progress analyzing the issue, given your latest.

from iodbc.

smalinin avatar smalinin commented on July 17, 2024

Function SQLBindParameter (from libiodbc ) could not return SQL_INVALID_HANDLE because such case isn't existed in the source code.

SQLBindParameter_Internal (

Attach here your log file for issue.

from iodbc.

alinaliBQ avatar alinaliBQ commented on July 17, 2024

Let me clarify, I believe when calling SQLBindParameter with libiodbc installed, libiodbc does not sent the call of SQLBindParameter to my driver. And the case of SQL_INVALID_HANDLE being returned should exist in libiodbc, and the logic should be in CALL_DRIVER, where retcode is changed.

CALL_DRIVER (pstmt->hdbc, pstmt, retcode, hproc3,

I don't have logs directly from libiodbc, only logs from my driver which does not show SQLBindParameter being called. If you could kindly point me to a place where I can find a way to get logs from libiodbc (similar to ODBC tracing on iODBC Application), it would be greatly appreciated.

Here is a simplified log (with added message) from my driver:

SQLGetInfoW: SQLGetInfo called: 23 (SQL_CURSOR_COMMIT_BEHAVIOR), return int result 1
SQLGetInfoW: SQLGetInfo called: 24 (SQL_CURSOR_ROLLBACK_BEHAVIOR), return int result 2
SQLAllocHandle: SQLAllocHandle called with type 3
SQLAllocStmt: SQLAllocStmt called
SQLGetStmtAttrW: SQLGetStmtAttr called with attr 10010
SQLGetStmtAttrW: SQLGetStmtAttr called with attr 10011
SQLGetStmtAttrW: SQLGetStmtAttr called with attr 10012
SQLGetStmtAttrW: SQLGetStmtAttr called with attr 10013
// This is supposed to be where SQLBindParameter is called. 
// On Windows, the logs show that SQLBindParameter is being called, but not on libiodbc on macOS.
SQLFreeHandle: SQLFreeHandle called with type 3
SQLFreeStmt: SQLFreeStmt called [option=1]
SQLDisconnect: SQLDisconnect called
SQLFreeHandle: SQLFreeHandle called with type 2
SQLFreeConnect: SQLFreeConnect called
SQLFreeHandle: SQLFreeHandle called with type 1
SQLFreeEnv: SQLFreeEnv called

from iodbc.

TallTed avatar TallTed commented on July 17, 2024

@alinaliBQ — The "ODBC Tracing on Mac OS X" section of this article should provide the detailed instructions you want...

from iodbc.

alinaliBQ avatar alinaliBQ commented on July 17, 2024

@TallTed Thanks for the link! I have shared it with my colleagues working with macOS who might find it useful. However, the instructions are for OpenLink ODBC Administrator.app and doesn't explicitly say that it can also work in an environment where only libiodbc is installed (using brew install libiodbc) and without the OpenLink ODBC Administrator app. So I'm not sure if that will work. During my tests, the issue with SQLBindParameter does not occur with OpenLink ODBC Administrator.app, only with libiodbc (installed using brew install libiodbc).

Currently my hands are tied with other items to work on, but when I do get a chance to try it out, I will post updates here.

from iodbc.

alinaliBQ avatar alinaliBQ commented on July 17, 2024

@TallTed Thank you for the update and the information. I have now updated the GitHub issue to clarify that the issue does not occur with OpenLink ODBC Administrator.app.

from iodbc.

smalinin avatar smalinin commented on July 17, 2024

You could do next:

  1. Add the next to your odbc.ini , for enable trace iODBC
[ODBC]
Trace         = 1
TraceFile     = /Users/myuid/odbc.log

but it may not help much you for detailed analyze issue
2. build IODBC binaries with debug info and without optimization for use with debugger

  • checkout iODBC sources from github, than run next commands in console for build
$ autogen.sh
$ export CFLAGS='-O0 -g -mmacosx-version-min=10.9 -arch arm64'
$ export LDFLAGS='-g'
$ ./configure --disable-gui --disable-shared --with-pic --prefix=/usr/local/debugODBC
$ make
$ make install
  1. Link your test App with new debugODBC library, than run your test app under lldb , set breakpoint on iODBC function SQLBindParameter_Internal and trace.

from iodbc.

alinaliBQ avatar alinaliBQ commented on July 17, 2024

@smalinin Thanks so much for the detailed steps. Recently I have been assigned to also work on another project, and the rest of the team likely won't be able to have time to investigate for this ticket in the near future given the timelines we have. This issue is not a blocking issue with our driver. I think the issue likely has to do with discrepancies between Homebrew package for Big Sur and the repository.

from iodbc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.