Allthough I try to avoid it, I sometimes get this message when testing/debugging my programs: "EOLEDBError: OLE DB error occured. Code 80040E2Fh"
Is it possible to retrieve more information than this?
If so: how?
What I do now is:
- catch the exception
- write error-message, sql-statement and parameter/field-values to a text-file.
- Edit the saved SQL-statement so it containes the literal values.
- Execute the statement in SQL Server's query analyzer
- Then I get a more meaningful message
What I would like is to retreive the more meaningful message directly in my programs.
Version info: Delphi 7.0, SDAC 3.50
OLE DB error occured. Code 80040E2Fh
Thanks, this seems to bee helpful.
I moved the connection creation from the main thead to the thread that uses the DBConnection but now I run into another error: StartTransaction raises an exception in combination with TMSQuery.fetchall = False.
I can work around this, but maybe this is something to fix in a future release?
But thanks again for your quick reply.
I moved the connection creation from the main thead to the thread that uses the DBConnection but now I run into another error: StartTransaction raises an exception in combination with TMSQuery.fetchall = False.
I can work around this, but maybe this is something to fix in a future release?
But thanks again for your quick reply.
When setting TCustomMSDataSet.FetchAll = False you should keep in mind that execution of such queries blocks current session. In order to avoid blocking OLE DB creates additional session which causes following problem:
· Each additional session runs outside of the transaction context, thus TMSConnection.Commit and TMSConnection.Rollback operations in main session won't apply changes made in additional sessions. This also concerns changes made by TDataSet.Post.
· Each additional session runs outside of the transaction context, thus TMSConnection.Commit and TMSConnection.Rollback operations in main session won't apply changes made in additional sessions. This also concerns changes made by TDataSet.Post.