Results 1 to 4 of 4
  1. #1
    Join Date
    Jul 2016
    Posts
    3

    Unanswered: Using Arabic text in the where clause of a query Access

    Hi,
    I am using MS Access 2013 as a front end to retrieve data from a database (SQL Server 2008 R2) via (ODBC), and the tables are linked.

    I created a query to retrieve all the records in the table (categories) filter records based on an Arabic text in the field (name), for example:

    select * from categories where name like '*خدمة *';

    This query returns nothing when the table is linked to the SQL server, but when I converted the same table to local table, this query works and returns all the records with that condition.

    I appreciate if you can help me to solve this problem.

    Sulyim

  2. #2
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    Just for giggles and grins, please try to edit your query to ensure that it uses Unicode instead of OEM text by prefixing the constant with a capital N. In the case of your example, that would be:
    Code:
    SELECT *
       FROM categories
       WHERE name LIKE N'*خدمة *';
    If you have not enabled the "Passthrough query" option, this will produce an error message. If so, set the option for this query. You might want to consider setting it for the connection to the SQL Server so that it takes effect on all queries.

    -PatP
    In theory, theory and practice are identical. In practice, theory and practice are unrelated.

  3. #3
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    Please let me know what results this produced. I'm curious to know if it worked, and willing to help if it failed and you can give me more insight.

    -PatP
    In theory, theory and practice are identical. In practice, theory and practice are unrelated.

  4. #4
    Join Date
    Jul 2016
    Posts
    3
    Dear Pat Phelan,
    The issue has been by using Passthrough query with letter N precedes the Arabic word.
    Many thanks for your support

    Sulyim

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •