Page 1 of 1
SDAC 4 - Error in First/Last method
Posted: Tue 03 Apr 2007 11:43
by Douglas Amaral
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
Posted: Tue 03 Apr 2007 12:41
by Jackson
Please specify the exact error message that you get.
Error Message
Posted: Tue 03 Apr 2007 13:41
by Douglas Amaral
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.
I found a solution
Posted: Tue 03 Apr 2007 19:49
by Douglas Amaral
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.
Posted: Wed 04 Apr 2007 11:46
by Jackson
Try to download and test the last build of SDAC 4 (4.00.0.4). It includes fix to this problem.
I am using it
Posted: Wed 04 Apr 2007 16:38
by Douglas Amaral
Hi EvgeniyM
I am using its build.

Posted: Thu 05 Apr 2007 08:20
by Jackson
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.
Posted: Wed 06 Jun 2007 12:15
by Ludek
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)
Posted: Wed 06 Jun 2007 14:18
by Ludek
// deleted the callstack, was too hard to read
New idea: this assertion appears much more often, if I set the flatbuffers property to true.
Posted: Thu 07 Jun 2007 08:31
by Ludek
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.
Posted: Fri 08 Jun 2007 13:49
by Jackson
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.
Posted: Sun 10 Jun 2007 10:38
by kurtbilde
This is a showstopper for me - when will it be available?
-Kurt
Posted: Mon 11 Jun 2007 09:30
by Antaeus
We are planning to make the new build of SDAC available in a couple of days.