Problem dealing with accents using MSSQLServerDataBase

Hi guys! I’ve been having issues using MSSQLServerDatabase. My database collation is Modern_Spanish_CI_AS and when I try to retrieve data from the DB using selects, I can’t get the data properly when there are chars like .

Any solution??

this is part of my code

dim json as new JSONItem
try
json.Value(“id”) = rs.Field(“IDEmpleado”).Value
json.Value(“name”) = rs.Field(“Empleado”).Value
json.Value(“order”) = rs.Field(“Orden”).Value
dim base64Image as string = App.ObtenerBytesDeImagen(rs.Field(“Imagen”).Value)
if(base64Image <> “”) then
json.Value(“photo”) = base64Image
end if
return json
catch ex as NilObjectException
return nil
catch ex as JSONException
return nil
end try

I’d try looking at encodings on the returned string values of text fields. Something like this:

json.Value("name") = rs.Field("Empleado").StringValue.DefineEncoding(Encodings.UTF8)

If necessary, substitute UTF8 with whatever encoding it should be in.

Thank you very much!! that was the problem!! I changed it with

json.Value("name") = rs.Field("Empleado").StringValue.DefineEncoding(Encodings.WindowsLatin1)

and now it works!! Thank you very much again!