I can work on a more robust solution in due course. I have a feeling this 32K VARCHAR declaration may impact performance? Memory usage doesn't seem too bad on the computer while the program is running and doing its thing until the data has to be exported from the DBDataSet to CSV using laddbexport unit and the TCSVExport library, where, prior to export, memory usage sits at about 20Mb, and then after the export it jumps to 600Mb, and stays like that even though I have free'd the TSCVExport creations!Īnyway, it has worked for now RVK so thank you. And whilst 95% of the time, these values won't be anywhere near 32K in length, and will rarely even be over about 500 characters, but any one of them could be at some stage and I don't want the program to crash out because I've been to reserved and set only, say 5K. However the problem I have is that the max value I need to set for these values is 32K! So I have had to decalre VARCHAR(32000) for every row in my database. unixepoch(time-value, modifier, modifier. julianday(time-value, modifier, modifier. So I reverted those changes and then tried your second suggestion, which did fix the issue, in that it does now display what it should. Overview SQLite supports six date and time functions as follows: date(time-value, modifier, modifier. SELECT CASE(* as TEXT) from MY_TABLE but I got invalid syntax error, but I couldn't see where it was wrong. In my CREATE TABLES statement I declared the values as Text and then in my SELECT statements I used CASE, e.g. I couldn't get the first suggestion to work. Is that right? If so, how do I fix the issue? I need DBGrid to be able to show strings of any length and I need SQLite to be able to store strings of any length. I read somewhere that there may be a restriction on Params to 255 chars. I have narrowed the problem down, I think, to the (StringValue).AsString := MyString, which I use. So somewhere in my code there is a restriction on strings in the SQLIte database of 255 characters. That ensured DBGrid could display the result again, but they are truncated at 255 characters. So then I switched Text to VARCHAR which I read was similar but perhaps less memory intensive. But then I got (MEMO) displayed in my DBGrid. So I changed that from Char(128) to Text, which I read was unlimited. So then I realised I was setting table fields to a longth of only 128 characters! Something I'd entirely missed! So my CREATE TABLE statement referred to Char(128) SomeColumn, which obviously restricted the length of what could be held. Values in the DBGrid were still being truncated on my main form. Regarding this problem, the first thing was that I'd forgot to set the compiler to to ensure long strings are accepted throughout the unit that I made for SQLite processing. I recently migrated my program to use SQLite, whichg was a lot of work, so I and my users keep spotting some issues. A user has filled a bug report regarding the length of values that appear in a DBGrid.
0 Comments
Leave a Reply. |