Hi all, thank you for your answers.
the table have 11 fields / 1 (one) record.
The DB Engine:
That db was created using SQLite. That db file is used in production / works fine in both read (Listbox / series of TextFields) / write.
The Table definition
That db is in use in another project (application) and works nice.
Also: I used a tool to watch the SQLExecute string, and read the whole (all) records: works nice.
I checked that SQLite db file and, yes, the Table exists, have one Record (only, as needed) and it have 11 fields. It is used to store / restore the Listbox header.
So if you have a database with 10 records and 5 fields
No, in that particular case / Table, the Table have only one Record.
Recordcount
No, I use FieldCount to get the information on that Tabl;e both information: Field Name (As found in the Table definition) and Field Data (the data stored in the Table).
I added the If block with Cnt lines because I had troubles with the reading of the two RecordSets. Since they are equal (this is two ways to get the informations about the same Table: one RecordSet is meant to get the Table Schema, the other one: the Data in the unique RecordSet of this Table).
BTW: this is symptomatic to what I have nearly everyday, so I quit Xojo, clears the Xojo Cache, left Firefox, SimpleText (yes, OS X), shutdown. Then boot, lauch Xojo (and only it), and check my code.
In the debugger, I saw the RecordSet contents (the data). I forgot if I was able to read the Schema names (in the debugger).
At last, that database file have three Tables (plus the automatically created sqlite_master
). At this stage, I only read the Heading Table. Next, I will read the core data (data that is usually stored in Listbox Rows (not here, this is a conversion method I build from scratch).
I have a JSON export button that export this SQLIte db into a JSON (.json) file. I do not took this code as sample to export to xml (for some unknow reason, I failed to adapt that code, so I wrote it from scratch for security).
Last: once I sent the question, I get a nap that lasted
around 4 hours ! What a nap !!! but I will have troubles tonight
Addition (the Edit):
The code after the MsgBox lines at first, extracted all entries of the RecordSet in a Loop using the FieldCount as found above. Once I was unable to understand / correct the OutofBounds error, I finally put code to get the 11 fields and I fall into the same trap. That is why I added the MsgBox RecordSet.FieldCount tests.