SQL Programming
Updating SQL Server nVarchar field with wwSql
Gravatar is a globally recognized avatar based on your email address. Updating SQL Server nVarchar field with wwSql
  Jukka Salminen
  All
  Nov 28, 2024 @ 10:42pm

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

Gravatar is a globally recognized avatar based on your email address. re: Updating SQL Server nVarchar field with wwSql
  Rick Strahl
  Jukka Salminen
  Nov 29, 2024 @ 08:16pm

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.)
© 1996-2024