How to write a 64-bit ODBC connection string

Hang Yu 1 Reputation point
2021-10-03T11:31:40.8+00:00

I have an application named "MyApp.exe" located on a host

VB
VB
An object-oriented programming language developed by Microsoft that is implemented on the .NET Framework. Previously known as Visual Basic .NET.
2,579 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Jack J Jun 24,296 Reputation points Microsoft Vendor
    2021-10-04T06:28:36.367+00:00

    @Hang Yu , you could refer to the Microsoft Article connect-to-an-odbc-data-source-sql-server-import-and-export-wizard to know how to connect ODBC by using connection string.

    Example Connection string in the article:

    Driver={ODBC Driver 13 for SQL Server};server=localhost;database=WideWorldImporters;trusted_connection=Yes;  
    

    If the response is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

  2. Albert Kallal 4,806 Reputation points
    2021-10-13T23:23:00.143+00:00

    As a general rule, when it comes to say server based data sources?

    the the connection string does not change. However, for the case of file based systems, say like FoxPro, or ms-access?

    Well, for FoxPro - there is not x64 bit choice.

    In the case of Access? There is a x64 bit version, and you MUST install that x64 bit version of Access.

    However, even in that case? The connection string for x32 vs x64 as a general rule does NOT have to be changed. The only real basic requirement is that the x64 bit provider is installed and exists on your computer.

    Now, .net installs the x64 and x32 bit sql providers for you. (assuming your using sql server).

    However, if you using MySQL, or say Oracle, or even say ms-Access?

    Then you have to ensure that the x64 bit provider (driver) is installed on that client workstation if you plan (choose) for your application to run as x64 bits. You can force the project to run as x64 (don't use any CPU in project settings).

    So, it quite much up to you to ensure that the correct ODBC drivers are installed on each workstation.

    0 comments No comments