Re: Like Operator with Unicode

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



The first thing to do would be to replace the old ODBC driver ({SQL Server})
with something more recent; preferably the SQL Native Client ODBC Driver;
see http://www.connectionstrings.com/?carrier=sqlserver2005

The second would be to make sure that the data is correct on the server side
by using the Unicode function to display what's you really have on the
server. You could also use the same Unicode function for testing what's you
are sending to the server as the string constant.

Finally, you should also take a look with the SQL-Server Profiler to see
what the ODBC Driver is sending exactly to the server.

--
Sylvain Lafontaine, ing.
MVP - Technologies Virtual-PC
E-mail: sylvain aei ca (fill the blanks, no spam please)


"Charax" <chopkins@xxxxxxxxxxxxxxxxxxx> wrote in message
news:%23$1mdoWNJHA.6044@xxxxxxxxxxxxxxxxxxxxxxx
Sylvain,

Thanks for your reply. These are just simple ad hoc queries initiated by
opening a simple New query from the Access MDB database window, no
parameters, the only criteria is a Like operator. The table is linked
through ODBC, SQL Server Native Client driver is 2005.90.3042.00. Database
sort order is General on a US English system.

The connect string:
ODBC;Driver={SQL
Server};Server=XPS;UID=Foobar;DATABASE=mylocaldb;Trusted_Connection=Yes

The objective is to return all records that contain ARSAKOU in the
txtSellwood field (where for this posting I've substituted Latin letters
ARSAKOU for the Greek letters, all uppercase Alpha Rho Sigma Alpha Kappa
Omicron Upsilon).

This query won't return data:
SELECT Coins.dwSellwood, Coins.txtSellwood
FROM Coins
WHERE (Coins.txtSellwood) Like "*ARSAKOU*"
WITH OWNERACCESS OPTION;

This query works:
SELECT dwSellwood, txtSellwood
FROM Coins
WHERE (txtSellwood) Like "*[A][R][S][A][K][O][U]*"
WITH OWNERACCESS OPTION;

Your thoughts appreciated,

Charax



.



Relevant Pages

  • Re: Datetime overflow with DBI ODBC setting 19th century dates with placeholders
    ... >> the date is passed to SQL Server ODBC driver in the same way for both ... >> I've also tried the SQL Server profiler on the server side, ... > In this way, you're defining what the data type is for the database, not ...
    (comp.lang.perl.misc)
  • Re: Please advice
    ... Thanks alot but how about Porta Number because on the same Server SQL Server ... Configuration with 1433 port should I put the same 1433 Port Number for SQL ... Native Client Configuration" node and expand it. ...
    (microsoft.public.sqlserver.clients)
  • Re: MS SQL Server 2000 ODBC driver crash
    ... I was using the latest odbc driver, ... > SQLFreeHandle crashes to free the statement handle. ... Did you apply any SQL Server service pack? ...
    (microsoft.public.data.odbc)
  • Re: ODBC Table Protection
    ... in to the server some how and then that login is linked to a user in the db. ... SQL Server MVP ... > I'm thinking of using an ODBC driver with Access as that ...
    (microsoft.public.sqlserver.security)
  • Re: Error from FoxPro connection in Visual Basic 6
    ... >Will this work on Windows Server 2003? ... > Try installing the VFP ODBC driver on the server. ... > Keep an eye on the product lifecycle for Visual FoxPro here: ...
    (microsoft.public.fox.vfp.dbc)