Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2010-07

sqlite db as resource

3 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Andrea Mauri

I would like to know if it is possible to access to a sqlite db file included in a lazarus application as resource.
Thanks,
Andrea

Reply by email

José Mejuto
to Andrea Mauri

Hello Lazarus-List,

Monday, July 5, 2010, 10:48:17 AM, you wrote:

AM> I would like to know if it is possible to access to a sqlite db file AM> included in a lazarus application as resource.

Resources are read only. SQLite by default needs a real file to access. You can configure recent SQLite modules to access non real files providing an abstraction layer to access to virtual files which in theory (I had never tested) will allow you to access a TResourceStream in read only mode. I do not know if this access mode is possible using SQLdb or you must manage the SQLite module directly.

Best regards, Jos?

Reply by email

Andrea Mauri
to José Mejuto

Il 05/07/2010 12.15, Jos? Mejuto ha scritto:

Show quoted text 6 lines
Resources are read only. SQLite by default needs a real file to access. You can configure recent SQLite modules to access non real files providing an abstraction layer to access to virtual files which in theory (I had never tested) will allow you to access a TResourceStream in read only mode. I do not know if this access mode is possible using SQLdb or you must manage the SQLite module directly.

Thanks Jos?, anyway I am looking for an already implemented feature, I use TSQLite3Connection. I have a DB that should be readonly. Probably the fastest way for me should be to copy the DB from the resources on a real file when the application is launched. Then access the Db from the real file.
Thanks for your help,
Andrea

Reply by email