If you are compiling for Unicode, your CString has a LPCWSTR (const wchar_t*) operator. In that case use sqlite3_bind_text16. If you're not using Unicode, then there is a LPCSTR (const char*) operator that will let you use sqlite3_bind_text directly like Alessandro shows.
Doug -----Original Message----- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Alessandro Marzocchi Sent: Wednesday, June 27, 2012 6:34 AM To: General Discussion of SQLite Database Subject: Re: [sqlite] convert CString for statement I have no way to test but i think a call like rc = sqlite3_bind_text(stmt, 1, (LPCTSTR)likeexp, -1, SQLITE_TRANSIENT<http://www.sqlite.org/c3ref/c_static.html> ); would work 2012/6/26 deltagam...@gmx.net <deltagam...@gmx.net> > Hello I have as input parameter > > CString likeexp > > but I think in the following statement likeexp hast to be char [] > > rc = sqlite3_bind_text(stmt, 1, likeexp, strlen(likeexp), NULL); > > > How can i convert likeexp to fit the above statement ? > > ______________________________**_________________ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-**bin/mailman/listinfo/sqlite-**users<http: > //sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users> > _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users