0

I have several records in my db (mssql) that contains § inside them.

I query my db as such :

        squery = "SELECT .... WHERE ....= '...§...'"
        AdoCmd.CommandText = sQuery
        AdoCmd.CommandType = 1
        Set AdoCmd.ActiveConnection = OBJdbConnection
        rsado.open AdoCmd,,1,2

However checking via the profile i see that the request is sent with § (which does not math my record obviously)

The solutions i've found only talk about the object repsonse and not the sql query

CharybdeBE
  • 1,791
  • 1
  • 20
  • 35
  • You need to use an `nvarchar` literal, not a `varchar` literal. `N'§'` not `'§'`. – Thom A Apr 02 '21 at 10:43
  • The non accepted answer was the solution for me – CharybdeBE Apr 02 '21 at 11:31
  • @CharybdeBE Amazing, both answers mention adding `<%@CodePage="65001"` so not sure how the accepted answer didn’t help? Only difference is that answer gives detail steps to check and not just assume one solution fits all because that is usually the case with encoding problems. – user692942 Apr 02 '21 at 12:00

0 Answers0