Page 1 of 1

Assertion failure OLEDBAccess.pas line 4260

Posted: Sun 15 Jun 2008 16:41
by laegteskov
I'm running SDAC (4.35 - 4.50 doesn't work for me yet) in an environment with multiple users over the internet with polling=true and once in a while (2 times pr 10 users a day) I get this Assertion failure OLEDBAccess.pas line 4260. I think I have to invest in SDAC with source code to find out the exact cause of the error.

Meanwhile, I was wondering if you could give me a hint or something to find the cause of the error. It's when running a query (Open or Active=true).

I use threads where in which I uses a new connection and I don't know if that could cause the error.

Thanks,

Lasse Laegteskov

Posted: Tue 17 Jun 2008 08:53
by Antaeus
> 4.50 doesn't work for me yet
Recently we have released the new build of SDAC 4.50. Could you test this issue with the latest SDAC? If you cannot, please specify by what reasons.

> I use threads where in which I uses a new connection and I don't know if that could cause the error.
This is the correct approach for using SDAC in multithreaded application. Other components (TMSQuery, TMSStoderProc, etc.) also must not be used in more than one thread simultaneously.

Posted: Tue 17 Jun 2008 09:05
by laegteskov
I tried version 4.50, but when I installed it and run my application it started up with an assertion failure.

I have an open connection to two different databases and something in the new version gives another error and I didn't have time to examine the problem.

I give it a try and installed the 4.50 and return with that error.

Lasse

Posted: Tue 17 Jun 2008 09:49
by laegteskov
With 4.50 i get this error:

Assertion failure (D:\Projects\Delphi\Sdac\Source\MSServices.pas, line 1380).

Code: Select all

  Query:=TMSQuery.Create(self);
  Query.Connection:=FormInfoData.SystemDB;
  Query.SQL.Add('SELECT * FROM LoginLog');
  Query.Open;
  Query.Append;
  Query.FieldByName('ClientID').AsInteger:=GetClientID;
  Query.FieldByName('UserID').AsInteger:=GetUserID;
  Query.FieldByName('SessionID').AsInteger:=SessionID;
  Query.FieldByName('CreatedClientTime').AsDateTime:=Now;
  Query.FieldByName('Minutes').AsInteger:=Minutes;
  Query.Post; << assertion error
I haven't change a line of code from version 4.35 to 4.50 in this section of my application and 4.35 works. So it seems I'm stuck with version 4.35.

In the application I open up 2 connections to two different databases and I'm trying to post to one of them. That's about it - I will see if I can generate a stand-alone app to help you out.

I know that this isn't much help and if there is any way I could to give you any more help please ask.

Posted: Tue 17 Jun 2008 10:39
by laegteskov
I solved problem with 4.50 vs 4.35 just by loading data from the databases in another order. Strange, but it worked.

Let's leave it with that so far - I'll get back if the "Assertion failure OLEDBAccess.pas line 4260" stills gives problems on a regular basis.

Regards,

Lasse

Posted: Wed 18 Jun 2008 07:12
by Antaeus
Could you prepare a complete small test sample that reproduces this problem? Also include the script to create and fill the table(s) used in it. You can send them to sdac*crlab*com.

Posted: Thu 19 Jun 2008 10:22
by laegteskov
I don't think I can because the error in line 4260 is periodic. I have bought SDAC with source and today I got an related error:

Code: Select all

function TCustomMSDataSetService.GetIConnection: TOLEDBConnection;
begin
  Result := TOLEDBConnection(TDBAccessUtils.GetIConnection(UsedConnection));
  Assert(Result  nil); <<< assert here
end;
It sometimes can't get the connection. I think the problem is that I run in Disconnected mode because my application runs on many clients over the internet so I thought that was a pretty neat idea, but it seems to create more problems than it solves. I'll try to run a couple of days with Disconnected disabled (still polling though) and see what impact it has on the system.

I have Eurekalog installed and can provide you with this information if it helps?

Kind regards,

Lasse Laegteskov

Posted: Thu 19 Jun 2008 23:07
by laegteskov
Update:

The assertion error appears on highly unstable networks and I have played around with DisconnectMode:=True/False and other settings.

Actually SDAC does a very good at keeping the connection. E.g. when I unplug the network cable an error appears and after pressing OK and plug the cable in again the application continues as nothing has happend.

I can't force the assertion to appear on my network, so it's difficult to track the error down right now. I'll have to wait until another user has the problem again and send me the Eurekalog-error. With the source code I get much more information.

Posted: Fri 20 Jun 2008 07:29
by Antaeus
Thank you for your help. When you get the additional information, you can send it to us by e-mail.