[Wxsqlite-developers] adding full precompiled SQL to wxsqlite
Status: Beta
Brought to you by:
blackpaw
From: Jake S. <ja...@za...> - 2004-03-05 22:31:00
|
Most of the work has already been done. I think that there only needs to be some extra methods added to the wxSQLiteQuery class. Such as: bool wxSQLiteQuery::Bind(int idx, wxString value){ int rc = wxsqlite_bind(pVm, idx, value.c_str(), -1, 1); if(rc == SQLITE_OK) return TRUE; return FALSE; } and bool wxSQLiteQuery::Reset(){ lastErr = wxT(""); char *pzErrMsg = NULL; int rc = wxsqlite_reset(pVm, &pzErrMsg); if (rc != SQLITE_OK){ if (pzErrMsg){ lastErr = wxString(pzErrMsg, wxConvUTF8); wxsqlite_freemem(pzErrMsg); return FALSE; } } return TRUE; } I don't quite understand exactly how you have mapped into the sqlite dll, but mapping to sqlite_bind and sqlite_reset in the same way will work.You will notice that Reset() is very similar to Close() (not only because 80% of it is a direct cut and paste! :) ). Anyway I think that is all that needs to be done. Jake |