You are not logged in.
Pages: 1
Hi,
I defined
TSQLMyFileInfo = class(TSQLRecord)
private
FMyFileDate: TDateTime;
FMyFileSize: int64;
procedure SetMyFileDate(const Value: TDateTime);
procedure SetMyFileSize(const Value: int64);
published
property MyFileDate: TDateTime read FMyFileDate write SetMyFileDate;
property MyFileSize: int64 read FMyFileSize write SetMyFileSize;
end;
but when I try to recover the stored data
var fo: TSQLMyFileInfo;
...
fo := TSQLMyFileInfo.Create(MyDataBase, aId);
I get an access violation (when setting the value of FMyFileSize).
As far as I have been able to trace, it gets the right value from the stored table and the value is correctly passed until procedure SetInt64Prop in SQLite3Commons. There it seems that the assembly code thinks the value is an address to read from.
Now I've changed the property type from Int64 to integer (more than enough for what I need) and have regenerated the tables and everything works fine. So, I guess it is a small bug (or may be I should give up programming and get some good english course )
Offline
Offline
I fixed the issue in SetInt64Prop() with a setter method.
See http://synopse.info/fossil/info/d36c88fdb5
I've added the associated regression test.
Nice catch!
Thanks for the feedback. You won't have to give up programming.
Offline
Pages: 1