Forum > Database
[Solved!] DBLookupListBox shows (MEMO) in place of the data
heebiejeebies:
Hi all,
I have a DBLookupListBox connected to an SQLite database. I previously had an issue where all entries were appearing in the box as (MEMO) instead of displaying the string. Someone on here suggested I cast the entries as CHAR. I've been using the following query for 2 years with no issues:
SELECT CAST(Issue AS CHAR) AS Issue, ID FROM MasterProtocol
Without me changing anything other than FPC/Lazarus version (and I presume Sqlite version as well), this has suddenly stopped working and is now displaying (MEMO) in place of the actual data again. I have tried casting to VARCHAR and TEXT, have tried ensuring the field definition in the query is a String, both in the inspector and in code. Nothing works - I can't get this to display anything but (MEMO) in the DBLookupListBox. Very confusing and frustrating, I have several of these in my program so it's basically broken at the moment until I can figure this out.
Current SQlite version is 3.45.1
Oh and I doubt it's relevant but I did change from using Fedora to using Mint as well.
Any help is appreciated, thanks a lot for your time.
Zvoni:
There were some changes in the sqlite3connection-class
Use OnGetText-Event
heebiejeebies:
Thanks. I tried putting this in the OnGetText event of the field:
--- Code: Pascal [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} --- Text := Sender.AsString;
Now everything is showing up as blank instead of (MEMO).
heebiejeebies:
Hmm, I just noticed when I look at the relevant field in the query using the inspector, the BlobType is stuck on ftMemo? i.e. When I pick another option from the dropdown it stays as ftMemo. Don't know if that's relevant but I just noticed it.
Zvoni:
--- Quote from: heebiejeebies on December 10, 2024, 11:21:21 am ---Hmm, I just noticed when I look at the relevant field in the query using the inspector, the BlobType is stuck on ftMemo? i.e. When I pick another option from the dropdown it stays as ftMemo. Don't know if that's relevant but I just noticed it.
--- End quote ---
It is. Try it out if it works.
Since i don't use DB-Bound controls i'm not that much help
Navigation
[0] Message Index
[#] Next page