Recent

Author Topic: [ask]Is there native sqlite  (Read 3780 times)

irw10062

  • New Member
  • *
  • Posts: 31
[ask]Is there native sqlite
« on: October 05, 2012, 04:01:53 am »
is there any native sqlite for lazarus,
no need library .dll / .so to run it

thanks

CaptBill

  • Sr. Member
  • ****
  • Posts: 435
Re: [ask]Is there native sqlite
« Reply #1 on: October 05, 2012, 04:48:01 am »
There are components on the SqlDB tab which set you right up. Not "natively" but as pre-installed dcu's.

irw10062

  • New Member
  • *
  • Posts: 31
Re: [ask]Is there native sqlite
« Reply #2 on: October 05, 2012, 05:24:55 am »
There are components on the SqlDB tab which set you right up. Not "natively" but as pre-installed dcu's.

what's the name of component, TSQLite3Connectin required library

CaptBill

  • Sr. Member
  • ****
  • Posts: 435
Re: [ask]Is there native sqlite
« Reply #3 on: October 05, 2012, 05:43:43 am »
Do you not have a SqlDB tab on your component palette? I thought it came stock with all installations. Maybe it is not stock so you must install it then.

irw10062

  • New Member
  • *
  • Posts: 31
Re: [ask]Is there native sqlite
« Reply #4 on: October 05, 2012, 08:10:48 am »
sqldb need connector, and the connector need client library

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: [ask]Is there native sqlite
« Reply #5 on: October 05, 2012, 08:23:41 am »
irw10062, you're right: Lazarus/FPC sqlite connectors all require an sqlite .dll/.so/.dylib.

Native database options are zmsql or tdbf (or, at a lower level, you can use bufdataset, memdataset, csvdataset directly in your code)
Want quicker answers to your questions? Read http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F

Open source including papertiger OCR/PDF scanning:
https://bitbucket.org/reiniero

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11383
  • FPC developer.
Re: [ask]Is there native sqlite
« Reply #6 on: October 05, 2012, 09:56:32 am »
Sqllite is PD, so static linking could be an option. (so compile sqlite library to .a, and link that .a into the binary, adapting headers if necessary)

That is not a prepared path though, so not for the faint of heart  >:D

Dibo

  • Hero Member
  • *****
  • Posts: 1048
Re: [ask]Is there native sqlite
« Reply #7 on: October 05, 2012, 10:30:14 am »
Sqllite is PD, so static linking could be an option. (so compile sqlite library to .a, and link that .a into the binary, adapting headers if necessary)
I've never heard about this trick. Exists any free pascal wiki page about this? Could this also work with libQt4Pas?

ludob

  • Hero Member
  • *****
  • Posts: 1173
Re: [ask]Is there native sqlite
« Reply #8 on: October 05, 2012, 11:32:38 am »
Quote
I've never heard about this trick.
See this thread http://forum.lazarus.freepascal.org/index.php/topic,15712.msg84781.html#msg84781 for step by step instructions for linking statically sqlite. It is written in such a way that it can be applied to other libraries.
Quote
Could this also work with libQt4Pas?
Probably. There is no problem with the licence (lgpl with linking exception) but you link your app to certain level of QT by doing so. libQt4Pas comes also with some linux distributions. I don't know if and to what extend they are customised for the distribution.

 

TinyPortal © 2005-2018