SDAC 4 - Error in First/Last method

Discussion of open issues, suggestions and bugs regarding SDAC (SQL Server Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Douglas Amaral
Posts: 6
Joined: Tue 03 Apr 2007 11:20

SDAC 4 - Error in First/Last method

Post by Douglas Amaral » Tue 03 Apr 2007 11:43

Dears CoreLab Team

I am using a new version of SDAC (4.0) actually. But, I found a problem when I tried to call the First/Last method before while loop.
Its cause a exception message error (strange!!!).
Before update, I used 3.8 version of component. In this case, thats ok.
As solution, I put in my code a loop (while/do) :( , that is, if I wanna put the cursor at first position, I need (now) do:
While not MyQuery.bof do
begin
....
MyQuery.prior;
end;

or, in the same way, if I wanna put the cursor at last position, I need (now!!) do:
While not MyQuery.eof do...

Its not correct, of course. If I not it found a error message, just write:
MyQuery.First;
or
MyQuery.Last;

Can you have any idea or suggestion?

Thanks.

Best regards.

Sistema Prever
Douglas Amaral
Developer

Jackson
Posts: 512
Joined: Thu 26 Jan 2006 10:06

Post by Jackson » Tue 03 Apr 2007 12:41

Please specify the exact error message that you get.

Douglas Amaral
Posts: 6
Joined: Tue 03 Apr 2007 11:20

Error Message

Post by Douglas Amaral » Tue 03 Apr 2007 13:41

Well, the message is:

"Project GSAdmin.exe raised exception class EAssertionFailed with message 'DisposeBuf failed (D:\Projects\Delphi\Dac\Source\MemData.pas, line 7063)'. Process stopped. Use Step or Run to continue. "

Thanks.

Douglas Amaral
Posts: 6
Joined: Tue 03 Apr 2007 11:20

I found a solution

Post by Douglas Amaral » Tue 03 Apr 2007 19:49

Dear EvgeniyM (CoreLab Team)

I saw a post in the forum, march 27, wish you explain some solutions.
I tried apply it and the result has been exit.

Look your details:

"There is a property TCustomDADataSet.Options.FlatBuffers. It controls how dataset treats data of ftString and ftVarBytes fields. When set to True, all data fetched from the server is stored in record pdata without unused tails. When set to False, data of ftString and ftVarBytes fields with length more than 32 bytes is stored in preallocated memory blocks. Such fields are called "extended strings". Please see description of the FlatBuffers property in SDAC help for more information."

"This bug affects programs that use FastMM, but only if string fields contain data more than 2000 bytes.
If you don't have the 'DisposeBuf failed' assertion failure or Access Violation exception, your program doesn't containt conditions under which this bug appears."


Thank you.

Jackson
Posts: 512
Joined: Thu 26 Jan 2006 10:06

Post by Jackson » Wed 04 Apr 2007 11:46

Try to download and test the last build of SDAC 4 (4.00.0.4). It includes fix to this problem.

Douglas Amaral
Posts: 6
Joined: Tue 03 Apr 2007 11:20

I am using it

Post by Douglas Amaral » Wed 04 Apr 2007 16:38

Hi EvgeniyM

I am using its build.

:shock:

Jackson
Posts: 512
Joined: Thu 26 Jan 2006 10:06

Post by Jackson » Thu 05 Apr 2007 08:20

Please send us (evgeniym*crlab*com) a complete small test project.
This problem depends on the data in the tables, so send us a script for creating database objects and populating tables with data, or send us the database backup.

Also supply us the following information:
- Exact version of Delphi or C++Builder.
- Exact version of Microsoft SQL Server and OLE DB provider you use. You can see it the Info sheet of TMSConnection Editor.

Ludek
Posts: 301
Joined: Thu 12 Oct 2006 09:34

Post by Ludek » Wed 06 Jun 2007 12:15

I also have this bug, even using 4.0.0.7 - the "first" call fails with exactly this message "DisposeBuf failed" (only the rownumber differs - is 7377 now). scenario:
(cached updates)
1. open query with some param set to 1 - query is empty
2. append some records
3. post changes to db
4. close query
5. open query with some param set to 2 - query is again empty
6. close query
7. open the query again with param set to 1 - query contains all previously inserted data
8. call query.first -> this assertion appears
Can you reproduce it using these steps? I'll try to write some example, but it takes probably some time... :-(
(i'm using d2006 and fastmm4)

Ludek
Posts: 301
Joined: Thu 12 Oct 2006 09:34

Post by Ludek » Wed 06 Jun 2007 14:18

// deleted the callstack, was too hard to read
New idea: this assertion appears much more often, if I set the flatbuffers property to true.

Ludek
Posts: 301
Joined: Thu 12 Oct 2006 09:34

Post by Ludek » Thu 07 Jun 2007 08:31

I reproduced this bug under other circumstances (it seems to be a lookup-field issue) and sent you an email with testing project and database. Please have a look at it, thanks.

Jackson
Posts: 512
Joined: Thu 26 Jan 2006 10:06

Post by Jackson » Fri 08 Jun 2007 13:49

Thank you for your sample. It did help us very much.
We have reproduced the problem and fixed it.
This fix will be included in the next build of SDAC 4.

kurtbilde
Posts: 114
Joined: Wed 16 Mar 2005 16:02
Location: Odense, Denmark

Post by kurtbilde » Sun 10 Jun 2007 10:38

This is a showstopper for me - when will it be available?

-Kurt

Antaeus
Posts: 2098
Joined: Tue 14 Feb 2006 10:14

Post by Antaeus » Mon 11 Jun 2007 09:30

We are planning to make the new build of SDAC available in a couple of days.

Post Reply