3

I have a VB6 ADO recordest that contains unicode text and need to filter it using .filter method with unicode text. I tried to use N' function but it does not work when I use it in .Filter text

Rs.filter = "Name = 'Apple'"  'OK

Rs.Filter = "Name = N'英語'"  'Not working for filter text

How I should wrap the text or I need to use another function?

7
  • Do you happen to get an error? Commented Aug 29, 2022 at 23:16
  • What's type of DB that recordset reads from? Ms Access, MS SQL Server, other? It might be easier to filter it right there when retrieving the data for the RS. Commented Aug 30, 2022 at 10:26
  • @HelO'Ween It is MS SQL server. the legacy code used the recordset filter and I should follow that or make a big update that is not possible now. Commented Aug 30, 2022 at 20:44
  • @BrianMStafford yes I get an error message. Commented Aug 30, 2022 at 21:56
  • What message do you get? Adding it to your question would be very useful. Commented Aug 30, 2022 at 22:53

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.