Versions 6.0.1 thru 6.1.4 assertion failure on XE2 update 3

Discussion of open issues, suggestions and bugs regarding SDAC (SQL Server Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
PaulT2
Posts: 29
Joined: Wed 15 Aug 2007 19:31

Versions 6.0.1 thru 6.1.4 assertion failure on XE2 update 3

Post by PaulT2 » Tue 10 Jan 2012 15:54

In 6.1.4
"Assertion failure (D:\Projects\Delphi\Dac\SqlServer\Source\OLEDBAccess.pas, line 13196)"

In 6.0.1
"Assertion failure (D:\Projects\Delphi\Dac\SqlServer\Source\OLEDBAccess.pas, line 12755)"

Not having the source code version, can you point me in the right direction to work out what might be causing this. I'm sure the assertion is the same line of code in both releases...

It may very well be tied to "Command text was not set for the command object". However the SQL is most definitly set!

I've simplified the setup so that a TMSConnection is just used by the one TMSQuery. THis query is an "insert" statement (into an activity log type table). The query is setup at program start and never modified. New parameter values are set and ".Execute" called. 99% of the time, the statement works fine. This type of code is nothing out of the ordinary and such techniques have not caused problems with SDAC previously.

The only thing you may consider slightly out of the oridinary is our use of

"OLEDBAccess.ParamsInfoOldBehavior := true;"

This we have been using for the last 4 years as advised to me here :-

http://www.devart.com/forums/viewtopic. ... highlight=

I now have this code in production for a customer with an exception handler wrapped around it , so any advice would be greatly appreciated.

Paul.

AndreyZ

Post by AndreyZ » Wed 11 Jan 2012 10:50

Hello,

This error may occur in a multithreaded application. SDAC is thread-safe, but the restriction is that you cannot use one connection (TMSConnection component) in several threads, you must have connections in each thread. Please check that you have connection in each thread. If you are not using threads, please try composing a small sample that demonstrates this problem and send it to andreyz*devart*com, including a script to create a table.

PaulT2
Posts: 29
Joined: Wed 15 Aug 2007 19:31

Post by PaulT2 » Wed 11 Jan 2012 14:27

Thanks for the response Andrey. Intermittent as it is, I suspect the problem is likely to be due to our multi threaded use. The logging I am talking about is a new feature and can be called from a number of threads. However it IS ONLY called from one thread at a time. Having said that, the TMSConnection is in the main thread and the calls are coming into the main thread from other threads.

Within those other theads we do actually have separate TMSConnections for the activity of those threads. This logging really should make use of them as you describe. I will modify the application accordingly and report back if I continue to see the problem - although at the moment the application is stubbornly refusing to throw the error in any event.

Thanks,

Paul.

AndreyZ

Post by AndreyZ » Wed 11 Jan 2012 15:14

We are looking forward to hearing from you.

Post Reply