0

So we want to use SQL lite directly from source (mainly because we create a crossplatform opensource app and there are no crossplatfrom lib distributions of SQL LITE) So we download sqlite-amalgamation and create a simple static lib from it. We include sqlite3.h and sqlite3ext.h to our project file and than what - how to create a simple DB file and fill any fields in it?

Rella
  • 65,003
  • 109
  • 363
  • 636
  • 3
    Emm, how about `sqlite3_open()` and `sqlite3_exec()`? – sharptooth Apr 13 '11 at 10:34
  • 2
    [An Introduction To The SQLite C/C++ Interface](http://www.sqlite.org/cintro.html) – Nick Dandoulakis Apr 13 '11 at 10:38
  • You might also want to have a look at the Berkeley DB implementation of sqlite. I use it cross-platform (Ubuntu/Windows) and in some cases it might also be [faster](http://stackoverflow.com/questions/2824135/how-fast-is-berkeley-db-sql-compared-to-sqlite/2860892#2860892). – fnokke Apr 13 '11 at 11:41

1 Answers1

1

I found this tutorial as well as this video very helpful to get started. The video should help you set up the project so that you can create and connect to a simple db. The code from the first tutorial is almost identical to the example on the sqlite homepage. Despite lack of in-depth explanation the tutorial was extremely helpful to me since it comes with source code and MSVS projects. You can use those to have a play with. I would also recommend getting the SQLite Administrator tool to have a GUI for your db.