SQLite_UseDatabase

Last Updated2014-12-15
Created At2008-10-13

Grabs a handle to an SQLite database, creating one if it does not exist. Unless there are extenuating circumstances, you should consider using "sourcemod-local" as the database name. This provides some unification between plugins on behalf of users. As a precaution, you should always create some sort of unique prefix to your table names so there are no conflicts, and you should never drop or modify tables that you do not own.

stock Database SQLite_UseDatabase(const char[] database, char[] error, int maxlength)

Parameters

const char[] database
Database name.
char[] error
Error buffer.
int maxlength
Maximum length of the error buffer.

Return Value

Database A database connection Handle, or INVALID_HANDLE on failure. On failure the error buffer will be filled with a message.