+ Reply to Thread
Results 1 to 1 of 1

Function to Connect to SQL - where to put it

  1. #1
    Forum Contributor
    Join Date
    06-16-2010
    Location
    Tampa, FL
    MS-Off Ver
    Excel 2010
    Posts
    278

    Function to Connect to SQL - where to put it

    Hi,
    I have a workbook that has several modules that make calls to the SQL database. I have a function defined for the connection string. The function is at the top of the module. There are two different connection strings (so 2 diff functions). I wanted to put both functions in a single location, but when I don't have it at in the module I get an "ambiguous name" error.

    What would be the right way to handle this?

    Thanks!

    EDIT: I finally figured out that what I really need to do is to define the connection strings as Constants (example below)

    Please Login or Register  to view this content.
    Last edited by ker9; 11-21-2011 at 03:55 PM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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