[Solved] Filling TCombobox from a SQLite3 database lazarus / 16-Databases ---------------------------------------------------------------------- rickielynn · 2018-01-08 17:58 I've saved some data into a STRING field of an SQLite3 database.  Then I retrieve that data with a SELECT DISTINCT statement to fill a TCombobox.   All works well until the first data is a number, like 105, then the TCombobox fills with all zeros, even though 105 was saved to the database as a string.  I've tried testing the data with IsNumber(), then converting it to a string with IntToStr before sending it to the TCombobox, but haven't gotten IsNumber to work yet.  But it seems the data should already be a string anyway. Update 1: The problem doesn't seem to be with the TCombobox because I can display the first record, 105, in a TLabel.Caption indicating it is indeed a string, but when I try to display the second record, which is alpha, in TLabel.Caption it displays a 0. Update 2:  If I change the datatype in the database to Char or Text, it works.  Numbers will fill TCombobox as well as alpha.  Which is best to use, since I want to be able to store numbers as well as alphanumeric characters. ---------------------------------------------------------------------- Handoko · 2018-01-08 18:26 Bugs can happen anywhere in the source code. Without inspecting the code, we can't be sure to say where you did wrong. Please copy all the necessary files including the database into a new folder, excluding the lib folder, binary (*.exe) and bak files. Compress the folder and send the zip file to the forum. If for some reasons you're not willing to publicize the code, you can write a demo sample showing that issue. ---------------------------------------------------------------------- GAN · 2018-01-08 20:53 In SQlite if you don't define a default value to a column, then it's null, may be this. But as @Handoko saids, show the code and the table. ---------------------------------------------------------------------- rickielynn · 2018-01-08 21:10 Thanks, guys.  I didn't publish any code because I think the problem is in SQLite3.  I changed the records from type STRING to type TEXT in SQLite3 and the problem went away.