You are not logged in. Please login or register.
Active topics Unanswered topics
Search options
Hi,
I am trying to get the latest timestamp for each group in a table using:
SELECT EntryID, max(EntryDate) FROM Entries GROUP BY EntryID;
The query works if I use it in SQLite Database Browser but fails in SQLiteToolbox or when I try to use in a Lazarus program.
When running the program I get an EDatabaseError with message: TSqlitePassSelectStmt.BuildSchema : Table or field not found .
Is there some easy workaround I could do or will I have build a table myself going through each ID and get the latest date?
Found a problem on one of my machines which is running 64bit Ubuntu 8.04 and the corresponding 64bit Lazarus (0.9.24 and 0.9.26).
Everything seems to compile OK but it looks like there is a problem with integer size assumed to be 32 bit, causing a Segfault.
Same code works fine under 32bit Lazarus.
The debugger showed TSQLitePassDataset.GetBookmarkFlag to be where the fault occured.
I assumed that 64bit Lazarus took the construct 'PInteger(Buffer)^' to be a 64bit integer and I tried the simplistic approach of changing all such references to something like a DWORD pointer, but that did not get me much further.
I try and do some debugging if you have any suggestions of what else might need changing to make the component more 64bit friendly (assuming thats what the problem is).
Regards,
John.
I'll try and come up with some test. Sorry for the delay, just got back from overseas this month.
When I said it worked OK under Linux and Lazarus, I forgot that I was not using the design component on the form, just creating everything in the program.
There is a problem (at least under both Ubuntu 7.10 and 8.04 and Lazarus 0.9.24 and 0.9.26) where dropping a SQLitePassDatabase on a form will result in a corrupted .lfm file. Specifically, the Options.Synchronous and Options.TemporaryStorage fields have bad characters written to them. Possibly some of the bytes written look like they could be 32bit integers (looking at the .lfm file with a hex editor). Also just tried Lazarus 0.9.26 under windows and those option values also get corrupted.
I think I have found a problem with using SQLitePass in a lazarus application under linux and also having sqliteds in the 'uses' section can cause runtime errors in the application. I was not actually using sqliteds and removing it from the uses clause solved the problem (took a while to work that out though). I did not have that problem with the same source code under Windows lazarus. I can happily report that SQLitePass seems to work fine under lazarus 0.9.26 (same issue with sqliteds though).
Yes, I see that now. It's just that Firefox under Ubuntu Linux brings up the PDF in a separate application and I didn't realize I could click on the links in the PDF.
Locate also seems to work fine now, thanks for your efforts.
I am had trouble determining if a filter actually resulted in any records because it seemed that, no matter what I tried, functions like SqlitePassDataset.FindFirst would always return false even though filtering did work and there where records that passed the filter. SqlitePassDataset.Found also always returned False. I ended up getting around the problem by just checking the current record contained what I was filtering for after applying the filter (SqlitePassDataset.Filtered:= True).
It might be worth noting that I have set up the database and dataset programmaticely, not using the Lazarus GUI form and object inspector.
Could I be doing something wrong or is this a bug?
The home page and download links point to PDFs rather than web pages.
I had to work out that the path to the new version was http://source.online.free.fr/Sources/SQ
s_0.35.zip
Thanks for the new version, I'm looking at trying out the Locate function which I was having trouble with.
Regards,
John.
Posts found [ 9 ]
Powered by PunBB, supported by Informer Technologies, Inc.
Currently installed 7 official extensions. Copyright © 2003–2009 PunBB.