+ Reply to Thread
Results 1 to 4 of 4

Using Ado and SQL in non-English office installation

  1. #1
    Registered User
    Join Date
    10-02-2017
    Location
    Finland
    MS-Off Ver
    2016
    Posts
    2

    Using Ado and SQL in non-English office installation

    Hi,

    Trying to do this in an non-English Office 2016 installation.

    Please Login or Register  to view this content.
    The last line fails to open the as the bLimit evaluates as true/false in non-English language. The SQLString becomes in this case "SELECT Process.ProcessName FROM Process WHERE Process.IsApproved = True And Process.HasOutdoors = Sant". (Sant is True in Swedish).

    How do I work around this? Is there any setting in VBA where you force variables to be english? I want my macro to be installation independent.

    I could of course write

    Please Login or Register  to view this content.
    And use this instead of bLimit. But my VBA program is much larger than this, and I wouldn't want to search/replace all these issues in SQL queries.

    Thanks in advance,
    Johan

  2. #2
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: Using Ado and SQL in non-English office installation

    Hi,

    There isn't a setting for that since a Boolean variable is not language dependent: it's just True or False. The issue is caused by the implicit coercion to a string when you append it to the SQL string. I would think you either need an IIf type construction similar to what you have, or you might be able to pass it as a Long since most databases don't really have a boolean data type per se, as far as I know.
    Don
    Please remember to mark your thread 'Solved' when appropriate.

  3. #3
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    365 Win 11
    Posts
    7,238

    Re: Using Ado and SQL in non-English office installation

    What database are you connecting to?

  4. #4
    Registered User
    Join Date
    10-02-2017
    Location
    Finland
    MS-Off Ver
    2016
    Posts
    2

    Re: Using Ado and SQL in non-English office installation

    Access database file (.mdb)

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. New Office installation formula problems
    By Annelie in forum Excel General
    Replies: 5
    Last Post: 04-09-2010, 08:57 AM
  2. [SOLVED] Office 2007 Installation
    By george-v in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 07-26-2006, 03:10 AM
  3. Installation of Office 2007
    By Ravindra in forum Excel General
    Replies: 1
    Last Post: 05-30-2006, 05:10 PM
  4. Problem with English formula in Swedish installation
    By akullen in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-17-2006, 09:00 AM
  5. Replies: 1
    Last Post: 10-09-2005, 12:05 PM
  6. MS Office 2003 Installation
    By taych in forum Excel General
    Replies: 1
    Last Post: 07-04-2005, 09:41 AM
  7. moving administrative installation of MS Office 2000
    By Christian Phoenix in forum Excel General
    Replies: 0
    Last Post: 03-08-2005, 11:06 PM
  8. Excel and Microsoft Office Installation
    By Tawn in forum Excel - New Users/Basics
    Replies: 2
    Last Post: 03-08-2005, 12:06 PM

Tags for this Thread

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1