Results 1 to 4 of 4
  1. #1
    Join Date
    Aug 2011
    Posts
    11

    Red face Unanswered: Trouble using ado to connect ms access to sql server

    hi,
    I'm trying to connect my MS Access database to SQL Server. I am getting the error "overflow at line 0"

    Here is my code:
    Dim cn As New ADODB.Connection

    Cn.connectionString = "Provider=SQLOLEDB;Data Source=JITC-PC\GEOINT;Integrated Security=SSIP;Initial Catalog=DEV_GEOINT"

    cn.Open

    Can someone tell me what I'm doing wrong?

    Thanks,
    Sharon

  2. #2
    Join Date
    Mar 2009
    Posts
    5,442
    Provided Answers: 14
    Not a true answer but a workaround. Try:
    Code:
    Dim cn As ADODB.Connection
    
    Set cn = New ADODB.Connection
    cn.ConnectionString = "DRIVER={SQL Server};SERVER=JITC-PC\GEOINT;DATABASE=DEV_GEOINT;Trusted_Connection=Yes;
    cn.Open
    Have a nice day!

  3. #3
    Join Date
    Aug 2011
    Posts
    11

    Smile can't connect ms access to sql server using ado

    It worked. Thank you so much for you help.

    Sharon

  4. #4
    Join Date
    Mar 2009
    Posts
    5,442
    Provided Answers: 14
    You're welcome!
    Have a nice day!

Tags for this Thread

Posting Permissions

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