I have connected to a database using ODBC in an unicode MFC Application and I am filling the database with some unicode data with the CDatabase::ExecuteSQL(CStringW …) like below:
CStringW sSql;
sSql.Format(L"INSERT INTO Reports ( %s, '%s')", sField1, sValue1);
m_db.ExecuteSQL(sSql);
but what i actually write into database is some ? characters instead of unicode ones.
Is there any solution to this.
Regards
Make sure your database field is of type NVARCHAR(x).