I have been enjoying using an in-memory SQLite database which has amazing speed but also allows for some complex data searches that using an array or dictionary cannot really do.
Currently, the database is a remote Postgres database being accessed in a Xojo desktop app.
What I am thinking about is loading up a large database record from the Postgres database, keeping it in RAM using a SQLite database, and then recalling the data from RAM when needed to be displayed.
My desktop app has a Tab Panel with a number of tabs each with a lot of data to display. Currently, on Open, all the data is loaded (for every field in every tab panel). I was thinking of only loading what is displayed and then when you move from tab panel to tab panel, the fields displayed pull the data from the in-memory SQLite database.
Some of the data is accounting which is checked for accuracy when the record in loaded. Iām sure this would be faster running this in RAM as well.
Unfortunately, the postgres database records are inherited from a previous system designed to have maybe 200 columns for a record which I canāt change.
Is there some shortcut to create a duplicate table in SQLite? I notice that Navicat has a command to duplicate a table (āstructureā or āstructure and dataā) so I am wondering if there is maybe an option that would save me some time and reduce the errors of manually creating the duplicate table in SQLite.
better than that, it creates direct xojo code that you can paste in a method to select your query.
Dim sqlcode as String
sqlcode = "SELECT LastName,FirstName,BirthDate,HireDate,Address"
sqlcode.AppendText " FROM Employee "
Dim rs as RecordSet = mDatabase.SQLSelect( sqlcode)
Navicat doesnāt generate native xojo code AFAIKā¦
it also doesnāt generate xojo controlitems with the right table/field values you can paste in xojo IDE.
but I agree with you buying navicat is a faster way !
Hi @Jean-Yves_Pochez - I never have SQL in my Xojo code since it getās hard to read and debug. Generating code seems to be handy, but it often ends in repeating the same code within your project and when it comes to maintenance you could have a lot of work.
But anyway, I have respect for you building your own solutions making you live as a developer easier.