SQLite - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: SQLite (
/showthread.php?tid=101470)
SQLite -
Sergei - 10.10.2009
Hello.
I decided to try SQLite since it seems perfect for my needs, but I have some issues with it.
Problem is simple, after openning database it doesn't seem to be opened since queries aren't processed by it.
pawn Код:
new DB:TESTDB;
public OnGameModeInit()
{
TESTDB = db_open("test.db");
}
//somewhere
new DBResult:something;
something = db_query(TESTDB,"SELECT * FROM players");
Whatever function I use to use query's result it always returns null, so I suppose there is no connected between database and server. Database is in scriptfiles folder and extension *.db.
If I run any of my queries in SQLite admin they all work without problems, but via SA:MP they do nothing.
I have searched around, but the only bug I have found was that it doesn't work in filterscripts (until 0.3). Anyone has any possible solution?
Regards
Re: SQLite -
Sergei - 10.10.2009
I have been testing a bit now and solution is to migrate your SQLite database to SQLlite v3, so new extension is *.s3db. It seems to be working now.