SQL Programming
Updating SQL Server nVarchar field with wwSql
I'm trying to update a nVarchar field on a SQL Server database. Code is as follows:
cSql = "UPDATE [Order] set UdManualTerminalName = '" +;
left(Thisform.cKommentti, 100) + [' where OrderId = '] + Thisform.cOrderId +[']
oSql.ExecuteNonQuery(cSql)
If the variable cKommentti contains a scandinavian character "ä" it shows up as "a" on SQL Server. Any chance to change this behavior?
Update:
It must have something to do with the japanese collation of the database. Even this does not work:
SELECT 'ÄÖÅäöå'
SELECT 'ÄÖÅäöå' collate SQL_SwedishStd_Pref_CP1_ci_as
Both give the same result: AOAaoa
I recommend using Unicode for SQL Server and then using Unicode to Ansi mapping. That should make everything that you can present in FoxPro pass through correctly to SQL Server - which is really only what your FoxPro codepage supports - everything else will end up as ? or 'stepped down' characters.
SYS(987,.T.)