Results 1 to 4 of 4
  1. #1
    Gold Lounger
    Join Date
    Dec 2000
    Location
    Hollywood (sorta), California, USA
    Posts
    2,759
    Thanks
    0
    Thanked 0 Times in 0 Posts

    DSN DataSource (97SR2)

    I'm trying to use Access to write a few queries for a user who wants to get at data in a SQL Server database. So I created the DSN, but can't "associate" the query to that datasource and make it stick. Everytime I run the query I get the Select Data Soure dialog. There must be a way to say "here's the connection object, use it all the time." Yes?
    Kevin <IMG SRC=http://www.wopr.com/w3tuserpics/Kevin_sig.gif alt="Keep the change, ya filthy animal...">
    <img src=/w3timages/blackline.gif width=33% height=2><img src=/w3timages/redline.gif width=33% height=2><img src=/w3timages/blackline.gif width=33% height=2>

  2. #2
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: DSN DataSource (97SR2)

    In Access 97, the way is by linking the tables. Jet queries need a table, you can't just create one and then attach a table later. If you use ADO, you can actually make the connection in code and return the information without linking tables, but you can't build a query based on it.
    Charlotte

  3. #3
    Gold Lounger
    Join Date
    Dec 2000
    Location
    Hollywood (sorta), California, USA
    Posts
    2,759
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: DSN DataSource (97SR2)

    I did link the tables for the query, but I'm still prompted to pick a DSN whenever I run the query. Any other tips on this?

    I do like the idea of coding an ADO connection that way I don't have to worry about the DSN. Thanks for your help.
    Kevin <IMG SRC=http://www.wopr.com/w3tuserpics/Kevin_sig.gif alt="Keep the change, ya filthy animal...">
    <img src=/w3timages/blackline.gif width=33% height=2><img src=/w3timages/redline.gif width=33% height=2><img src=/w3timages/blackline.gif width=33% height=2>

  4. #4
    Gold Lounger
    Join Date
    Dec 2000
    Location
    Hollywood (sorta), California, USA
    Posts
    2,759
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: DSN DataSource (97SR2)

    Ah Ha! I found it: Query Properties>ODBC Connection Str...

    Case closed.
    Kevin <IMG SRC=http://www.wopr.com/w3tuserpics/Kevin_sig.gif alt="Keep the change, ya filthy animal...">
    <img src=/w3timages/blackline.gif width=33% height=2><img src=/w3timages/redline.gif width=33% height=2><img src=/w3timages/blackline.gif width=33% height=2>

Posting Permissions

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