Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2004

    Unanswered: Logging into database automatically?

    Here's what I'm looking at.....

    I'm in Access and I run any basic SQL query such as:

    select COUNT(*) from employee_data where title = 'Programmer'

    and the next thing you know is a window pops up where I need to click on the "Machine Data Source" tab and then the appropriate "Data Source Name" which then has me type in my password. This allows me to tell it which database I am trying to tap into. (Lotus Notes in this instance) Is there any way to incorporate this info into the query so I don't have to keep retyping this info in?

    Thanks for the help.


  2. #2
    Join Date
    Mar 2003
    The Bottom of The Barrel
    Provided Answers: 1
    Open a connection to the db to begin with, then reference it whenever you need to run a query.

    For instance if you were to connect via ADO, you could do something like:

    Set Con = New ADODB.Connection
    Con.Open "Provider=insert your connection string here"
    Con.DefaultDatabase = "yourDatabase"

    Then you won't have to keep opening the connection everytime you run a query.
    Last edited by Teddy; 01-09-04 at 11:39.

Posting Permissions

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