Hi,
i'm using C++ builder XE Version 15.0.3953.35171 under WIN7. I try to use sqlite3.dll from my application to get data from the database. When running a simple select query and trying to print the results It print OK (n-1) item and crushes at the [size= 12.16px; line-height: 1.3em]end of item (n-1). This is my code:[/size]
//
static int callback(void *data, int argc, char **argv, char **Name)
{
fprintf(stderr, "%s: ", (const char*)data);
for (int i=0; i<argc; i++)
{
printf("%s = %s\n", Name, argv ? argv : "NULL");
}
printf("\n");
return 0;
}
//
DBDLL_API int ExecDb (char *pSql)
{
int rc;
char* zErrMsg;
const char* data = "Callback function called";
char stam[128];
if (Db_Exec != NULL)
{
rc = Db_Exec (pDb, pSql, callback, (void*)data, &zErrMsg);
if( rc!=SQLITE_OK )
{
fprintf(stderr, "SQL error: %s\n", zErrMsg);
sqlite3_free(zErrMsg);
}
}
else
rc = GetLastError ();
return (rc);
}
What did i missed here ? are there any special definition i have to set in the compiler ?
Thanks
Ofer[/i][/i][/i]