> > So whether hard coding the empty string in the query or using a > parameter (in which you can use some value other than an empty string) > depends on what you will need in the context of the application. It will, > of course, never return a row in which the abt_ownr field has a value > other than ''. One must presume this is intended. > My application is cross-database one. > Since SQLite does not support catalog/schema, this field will always be > empty. > I am just trying to write less specific code possible and generalize > all queries. > Now, I just tried this code: > std::wstring query = L"SELECT * FROM \"sys.abcattbl\" WHERE > \"abt_tnam\" = ? AND \"abt_ownr\" = \'\';"; > and still got "SQLITE_DONE" instead of "SQLITE_ROW".
std::wstring query = L"SELECT * FROM \"sys.abcattbl\" WHERE \"abt_tnam\" = ? AND \"abt_ownr\" = '';"; You do not escape apostrophe's in a string, only quotes. _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users