Recent

Author Topic: How can attach file to LAMW project  (Read 2108 times)

developing

  • New Member
  • *
  • Posts: 26
How can attach file to LAMW project
« on: March 03, 2017, 01:29:44 pm »
Hi all,

I think subject is clear, but again: How can I attach a file (like text, sqlite db, picture, and ...) to my LAMW project?

And How can I load attached file into my project?

For sqlite db I want attach a filled db into my project. For example for use in a dictionary project.

renabor

  • Jr. Member
  • **
  • Posts: 73
Re: How can attach file to LAMW project
« Reply #1 on: March 03, 2017, 02:42:51 pm »
Hello developing!

you can add some files to an app putting them under assets dir.
For .db you can try to put it in assets dir or in assets/databases (i'm used to put my db in assets/databases, but my configuration is not standard).

Then you can retrieve database full path this way:

FDataBaseName:=Self.GetEnvironmentDirectoryPath(dirDatabase) +'/' + jSqliteDataAccess1.DataBaseName;

where DataBaseName is the name of your .db
FPC 3.2.2 | Lazarus 2.2.3 | Kubuntu 22.04 64bit

 

TinyPortal © 2005-2018