Recent

Author Topic: SQLite3 embedded?  (Read 2549 times)

guest48180

  • Guest
SQLite3 embedded?
« on: April 07, 2018, 11:16:41 pm »
When I use SQLite3 with C++, I can add sqlite3.c and sqlite3.h to the projects and it embeds sqlite3 into my programs, making it so the end-user doesn't have to install it on their box. Are there any components for Lazarus that embed SQLite3?

Phil

  • Hero Member
  • *****
  • Posts: 2737
Re: SQLite3 embedded?
« Reply #1 on: April 07, 2018, 11:19:20 pm »
When I use SQLite3 with C++, I can add sqlite3.c and sqlite3.h to the projects and it embeds sqlite3 into my programs, making it so the end-user doesn't have to install it on their box. Are there any components for Lazarus that embed SQLite3?

Search the forum for that. I seem to recall that question was answered recently (in the affirmative).

totya

  • Hero Member
  • *****
  • Posts: 720
Re: SQLite3 embedded?
« Reply #2 on: April 07, 2018, 11:38:05 pm »
When I use SQLite3 with C++, I can add sqlite3.c and sqlite3.h to the projects and it embeds sqlite3 into my programs, making it so the end-user doesn't have to install it on their box. Are there any components for Lazarus that embed SQLite3?

Hi, end-user doesn't have to install sqlite3 :) Just copy sqlite3.dll to the your application directory...

guest48180

  • Guest
Re: SQLite3 embedded?
« Reply #3 on: April 07, 2018, 11:44:00 pm »
@totya: Even on Linux? Note my signature   ;D

@Phil:  That's what I'm doing right now. I hope this can be done with Lazarus.

totya

  • Hero Member
  • *****
  • Posts: 720
Re: SQLite3 embedded?
« Reply #4 on: April 07, 2018, 11:58:14 pm »
@totya: Even on Linux? Note my signature   ;D

Ok, I'm sorry, I didn't look at. Did you read this?

Quote
Note: To set the full library path (if you place your sqlite dll/so/dylib in a place where the OS won't find it, like the application directory on Linux/OSX), you can set the SQLiteLibraryName property (BEFORE any connection is established e.g. in the OnCreate event of the main form), like this:

SQLiteLibraryName:='./sqlite3.so';

guest48180

  • Guest
Re: SQLite3 embedded?
« Reply #5 on: April 08, 2018, 12:05:22 am »
BAM! That's it  :D

Now, I have another issue. This is a fresh install of Lazarus and FPC and I'm having an issue installing new packages. I'll open a ticket for that in another branch of the forum for this. And thanks, totya. That helped me a lot.

 

TinyPortal © 2005-2018