Results 1 to 3 of 3
  1. #1
    2 Star Lounger
    Join Date
    Apr 2002
    Location
    Arkansas, USA
    Posts
    163
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Connecting using OLE DB (access xp)

    <P ID="edit" class=small>(Edited by charlotte on 07-Sep-03 10:13. [Rule=10])</P>I am trying to code my connection to a SQL Server database using the on open event of the main form I have in my Access Front end. I located the OLE DB strings for SQL from www.able-consulting.com/ADO_Conn.htm but this site and my numerous books are not helping me code this correctly. I am hoping someone out there connects this way and can share a sample that they utilize.

    Thanks for any assistance.

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

    Re: Connecting using OLE DB (access xp)

    What specifically do you need help with, the connection string, the code to open the connection, or something else? Is your attempt failing and, if so, are you getting an error message? Are you using linked SQL Server tables or connecting only through code?

    I have a demo of using code to open and use connections to a non-linked database at http://www.rogersaccesslibrary.com/OtherLi...Foust,Charlotte. If you download the No Tables sample database, you'll see that it demonstrates the technique. It is built for connecting to Access rather than SQL Server, so the provider and connection strings would be different, but it might be of help.
    Charlotte

  3. #3
    2 Star Lounger
    Join Date
    Apr 2002
    Location
    Arkansas, USA
    Posts
    163
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Connecting using OLE DB (access xp)

    I guess it would be the code to open the connection. I will check out the link.

Posting Permissions

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