Thanks Stephan,I had already tried that solution in between my post and yours, but it fails with an out of memory error after about 15 seconds, before it gets as far as displaying anything. I'm running Win 7-64 with 12Gb physical memory.
Only 165,000 rows, but quite a lot of strings on each row.SQLiteSpy starts quickly, but does it use TCLientDataSet? I don't have a problem unless I use TClientDataSet. If there is another way to hook the dataset up to a dbgrid without using TCLientDataSet it might solve the problem.
Rgds, Andy On 21/01/2013 21:13, Hennekens, Stephan wrote:
Hi Andy, The display strings larger than 20 chars use the DISqlite3UniDirQueryInitFieldDef event. Check the demo 'DISQLite3_World'. procedure Txxxxxx.DISqlite3UniDirQueryInitFieldDef(const AColumn: TDISQLite3Column; const AFieldDef: TFieldDef); begin inherited; case AFieldDef.DataType of ftWideString: begin AFieldDef.Size := 255; end; end; end; No idea why loading your dataset takes 20 secs. I have for instance a data table with 300.000 records which loads in a 0.3 second. Did you try to open the table using SQLiteSpy? This tool gives a good impression how fast data tables can be loaded. Regards, Stephan Stephan Hennekens Alterra, Wageningen, The Netherlands Tel: +31 317 485887 (06-31960774) Skype: stephan.hennekens-----Original Message----- From: yunqa-bounce@xxxxxxxxxxxxx [mailto:yunqa-bounce@xxxxxxxxxxxxx] On Behalf Of Andy Sent: maandag 21 januari 2013 20:51 To: yunqa@xxxxxxxxxxxxx Subject: [yunqa.de] Re: SQLite Error 11 - malformed database schema ... near "TRIGGER" OK, back on this. I have partly sorted out the problem of all the grid showing the same row by using a TClientDataSet. I now have a different problem in that all columns are truncated to 20 chars. I thought that must be an easy one to solve until I browsed back a bit and I'm no longer sure there is a satisfactory solution. And there is another significant probem that it may not be possible to work round - it's only a medium size database, but using the ClientDataSet it takes 20 seconds to open and display any data! Neither of these are actually a problem with this particular thing I want to do because I don't need any visualisation of the data and don't need TCLientDataSet. But whatever components I choose at this stage I'm probably going to live with for some years to come, so I have to decide if this is likely to be a show-stopper on some future requirement. Rgds, Andy On 21/01/2013 15:43, Delphi Inspiration wrote:On 21.01.2013 16:23, Andy wrote:I have a hobby project where I would like to read an existing SQLite database. I am a professional programmer, but this is nothing to do with work so I tried the Personal version of DISQLite. I get the above error when running a SELECT query. From browsing the internet it seems possible that this is due to a limitation of the personal version and that it may work with the Pro version.Triggers are indeed not supported by DISQLite3 Personal. See http://www.yunqa.de/delphi/doku.php/products/sqlite3/feature_chart for a comparison of DISQLite3 Personal and DISQLite3 Professional.I'm prepared to buy it, but only if I'm sure this will fix the problem.You can test this yourself: Download the DISQLite3 Pro Demo from http://www.yunqa.de/delphi/doku.php/products/sqlite3/index by clicking on "Professional" in the Quick Info box.Sorry if the mailing list is not the right place to ask this, but I've failed to find any way to contact the programmer directly.The mailing list is just the right place for your question! Ralf _______________________________________________ Delphi Inspiration mailing list yunqa@xxxxxxxxxxxxx //www.freelists.org/list/yunqa_______________________________________________ Delphi Inspiration mailing list yunqa@xxxxxxxxxxxxx //www.freelists.org/list/yunqa _______________________________________________ Delphi Inspiration mailing list yunqa@xxxxxxxxxxxxx //www.freelists.org/list/yunqa
_______________________________________________ Delphi Inspiration mailing list yunqa@xxxxxxxxxxxxx //www.freelists.org/list/yunqa