0

I am trying to debug the scope_Identity() call in qt. To elaborate on that scope_identity supposed to return the sessions last inserted data ID, but this call does not work accordingly in Qt database calls. I am trying to figure if this returns a value from the database driver to Qt codes at all and at this point I manage to track the code executions to

bool QODBCResult::reset (const QString& query) 

method in qsql_odbc.cpp class.

In this method it accesses some win32 __stdcall calls, one of which I believe is responsible in connecting and retrieving data from the database.

SQLSetStmtAttr
SQLAllocHandle
SQLExecDirect

I am unable to find the code for these and I appreciate if someone can guide me on this.

Thank you very much in advance.

Tharanga
  • 2,007
  • 4
  • 32
  • 50

1 Answers1

1

Did you try to ask your favorite search engine? Perhaps it would guide you to the MSDN documentation pages (e.g. for SQLExecDirect) or to this question on stackoverflow: scope_identity vs ident_current that may contain an answer to your troubles.

Community
  • 1
  • 1
hmuelner
  • 8,093
  • 1
  • 28
  • 39