Thanks for posting your demo app, Graham
… very helpful.
[It’s interesting to see a Clarion/Legacy app after all these years. I’d forgotten how “simple” they look.]
Based on this advice from the “SQLite File Driver” section of the Database Drivers manual;
… 
I added the following to the “PrepareProcedure” inside your BrowseMEMTEST procedure;

… with the following findings;
- The tip above is well worth noting. Load time for the 1 million rows (on my system) takes 4.3 secs with the LOGOUT & COMMIT - and 7.9 secs without.
- My conclusion is that this would be a very efficient method of loading a data table into a SQLite memory table for use as a Lookup/Select list.
I am curious, tho. Why is the initial open of the DummyFile in the application thread necessary ?
That is, I know that it is necessary (because I tried it without this step), but I don’t understand what it’s doing (in terms of preparing the ground for subsequent opening of the MEMTEST table) ?
A very minor point regarding the DummyFile; you said you have it declared with “create unticked” - whereas, I found it doesn’t matter either way … tho, of course, Create-enabled is necessary for the MEMTEST table.
Something else I found of interest was this note in the “SQLite Accelerator Driver Strings” section of the Database Drivers manual;
… 
The MEMTEST table is defined exactly as described in this note - but, I wasn’t able to find a way to retrieve the increment (supposedly) generated by SQLite.
It doesn’t “simply appear” in the ID/PrimaryKey field as is suggested by the note.
-
Interestingly, tho, pragma details from the SQLite database do include reference to AUTOINC ?!
-
Also puzzling is that the Driver String Builder for SQLite for the following selection results in Driver options defined as /AUTOINC=**FALSE**
… which is back-to-front, surely ? (I assumed it was).
- SQLite does autoincrement
And for something else even more curious !! … I decided to create an ABC/OOP version of Graham’s demo app (Wizard generated), with the same MemTest.Dct as used by Graham’s CW-Legacy app - - - but, to date, I haven’t been able to get it to work. At the point where the MEMTEST table is opened, it fails with a “File could not be opened” error; presumably, because it cannot be CREATEd … Mmm !!
Regards, John Morter … dipping back into Clarion as a diversion during my time in COVID lockdown !