Keith, On Tue, Dec 27, 2016 at 10:59 PM, Keith Medcalf <kmedc...@dessus.com> wrote: > >> > 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.
Still got 101 (SQLITE_DONE). Any idea why sqlite3_expanded_sql() doesn't work? What do I need to include for it? Thank you. > > > > > _______________________________________________ > sqlite-users mailing list > sqlite-users@mailinglists.sqlite.org > http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users