Reputation:
got a small situation here, I haven't used TClientDataSet until recently(it requires midas.dll) so now I'm facing a very awkward error, not very descriptive:
Project E:\Work\XXX\binary\XXX.exe faulted with message: 'access violation at 0x00678827: write of address 0x00030a38'. Process Stopped. Use Step or Run to continue.
this happens whenever I try to set the value of a field in the clientdataset(I'm using it as a in-memory dataset) as so:
with ADataModule do begin
cdsTest.Append;
cdsTestAField.AsString := ATableField.AsString;
// ...
end;
both fields are TStringField, cdsTestAField has size 64 and ATableField has size 32
Note: that I'm calling the CreateDataSet method before anything else, also this happens only with the string fields, any help would be highly appreciated.
Thank you for your time.
Upvotes: 1
Views: 1754
Reputation: 116160
And where does ATableField come from? Could it be that it is an invalid reference to an object that is already freed?
Also, you can include midaslib.pas in your project to eliminate the use of an external midaslib.dll. It will make your project slightly larger, though, because you are basically compiling the dll in you exe.
Upvotes: 3