Hello,

I was wondering if anybody could give me some pointers on how to use SQLite in ServUO. I found this link to download SQLite dlls http://system.data.sqlite.org/index.html/doc/trunk/www/downloads.wiki but I don't know where to place them in the project to have access to those functions.

Eventually I would like to run a command to put all the books in the server in a table inside SQLite db.

I was going to use this example as my base, found at this link https://stackoverflow.com/questions/15292880/create-sqlite-database-and-table

Example SQLITE:
SQLiteConnection.CreateFile("MyDatabase.sqlite");

SQLiteConnection m_dbConnection = new SQLiteConnection("Data Source=MyDatabase.sqlite;Version=3;");
m_dbConnection.Open();

string sql = "create table highscores (name varchar(20), score int)";

SQLiteCommand command = new SQLiteCommand(sql, m_dbConnection);
command.ExecuteNonQuery();

sql = "insert into highscores (name, score) values ('Me', 9001)";

command = new SQLiteCommand(sql, m_dbConnection);
command.ExecuteNonQuery();

m_dbConnection.Close();


Any help is appreciated...
 
Back