+ Reply to Thread
Results 1 to 4 of 4

What is needed to open an ODBC connection with VBA?

  1. #1
    Forum Contributor
    Join Date
    12-15-2009
    Location
    Herndon, VA
    MS-Off Ver
    Excel 2010
    Posts
    163

    What is needed to open an ODBC connection with VBA?

    I want to query a Deltek GCS database. I would like to supply the query inside of my VBA code, instead of invoking a query on the cloud that I am connecting to.

    1. Is there a function to create an ODBC connection?
    2. What parameters will I need to supply besides userid and password?

  2. #2
    Forum Contributor
    Join Date
    12-15-2009
    Location
    Herndon, VA
    MS-Off Ver
    Excel 2010
    Posts
    163

    Re: What is needed to open an ODBC connection with VBA?

    The database I need to connect to runs on a cloud. I want to open an ODBC connection, provide a query, and drop the answers in cell A1 of the first tab.

    How do I do this? What parameters will I need to supply?

  3. #3
    Forum Contributor
    Join Date
    12-15-2009
    Location
    Herndon, VA
    MS-Off Ver
    Excel 2010
    Posts
    163

    Re: What is needed to open an ODBC connection with VBA?

    Here is what I am currently using:

    Please Login or Register  to view this content.
    Do I have to set up a User DSN or a System DSN? If so, how do I do that? When I click "Add" I see a list of drivers, but I don't see the name of the database/data source that I need to connect to which is 'GCSPremier.'

    Please help.

  4. #4
    Forum Contributor
    Join Date
    07-26-2012
    Location
    USA
    MS-Off Ver
    Excel 2007 & 2010
    Posts
    351

    Re: What is needed to open an ODBC connection with VBA?

    What is your code doing, or not doing, that doesn't work for you? I really only have experience doing this through .NET, so I can't be of TOO much help here. But I did find this article on setting up a DSN

    http://exceltoolset.com/how-to-creat...dbc-using-vba/

+ 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. ODBC Connection to OPEN Workbooks
    By hawkwind in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-15-2013, 12:09 PM
  2. [SOLVED] Use ODBC connection without setting it up in ODBC administration
    By ExcelGal in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-18-2012, 09:59 AM
  3. ODBC Connection:
    By Miguel Martins in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-04-2012, 02:39 PM
  4. Excel VBA makes ODBC connection to Access-How do you close the connection?
    By MrHockey in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-04-2010, 06:29 PM
  5. ODBC Connection
    By ffffloyd in forum Excel General
    Replies: 1
    Last Post: 12-28-2008, 11:48 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