Hello everyone, I'm currently working on a prototype database
system, but I'm kinda new to D and to sqlite3. The fragment of
code that gives me problems looks like this:
extern(C) int myCallback(void *a_parm, int argc, char **argv,
char **column)
{
return 0;
}
int new_entity(sqlite3* db)
{
const(char)* sql="SELECT ID FROM ENTITY;";
int result;
result=sqlite3_exec(db,sql,&myCallback,null,null);
writeln(result);
if (SQLITE_OK!=result)
{ return -1;}
return 0;
}
sqlite3_exec here returns 21, wich is the code for
SQLITE_MISMATCH. I know I'm doing something wrong, i just can't
find what.