Results 1 to 6 of 6

Thread: MS-Access Remote connection

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Feb 2006
    Location
    Hyderabad, India
    Posts
    233

    MS-Access Remote connection

    Hello,
    This is the code I am using to connect to a access database remotely.
    (Actually I am connecting to database on the same machine. I couldn't get hold of a person with a dbms and net connection on his machine , to try remote connection)

    VB Code:
    1. Private Sub Command1_Click()
    2. Set conn = New ADODB.Connection
    3. 'Set rs = New ADODB.Recordset
    4. On Error GoTo dberror
    5.  
    6. With conn
    7.   .ConnectionString = " PROVIDER = MS Remote ; " _
    8.                      & "Remote Server = http://x.x.x.x;" _
    9.                      & "Remote Provider = Microsoft.Jet.OLEDB.4.0 ;" _
    10.                      & "Data Source = d:\nse\nsedata.mdb" _
    11.                      & "User Id=Admin;Password=;"
    12.   .Open
    13.  
    14. End With
    15. 'rs.Open "todaydeal", conn, adOpenKeyset, adLockOptimistic, adCmdTable
    16. MsgBox ("successfully opened the connection")
    17. Exit Sub
    18. dberror:
    19.   MsgBox ("error connecting to database")
    20. Print Err.Source
    21. Print Err.Number
    22. Print Err.Description
    23. End Sub

    This part works fine.
    When I uncomment the statements involving recordsets, then I am getting the error:
    microsoft ado/rds
    8447
    internet server error
    I didn't post the actual ip address. May be I am getting paranoid , but I was not sure if it was the right thing to do.
    What is it that I should do?
    Thank you.

  2. #2

    Thread Starter
    Addicted Member
    Join Date
    Feb 2006
    Location
    Hyderabad, India
    Posts
    233

    Re: MS-Access Remote connection

    I am using MS-Access 2000 and windows xp professional.
    Please help
    Thank you.

  3. #3
    Software Carpenter dee-u's Avatar
    Join Date
    Feb 2005
    Location
    Pinas
    Posts
    11,127

    Re: MS-Access Remote connection

    Quote Originally Posted by srisa
    When I uncomment the statements involving recordsets, then I am getting the error
    What recordset are you talking about? Would you care to post the code you have that you have problem with?
    Regards,


    As a gesture of gratitude please consider rating helpful posts. c",)

    Some stuffs: Mouse Hotkey | Compress file using SQL Server! | WPF - Rounded Combobox | WPF - Notify Icon and Balloon | NetVerser - a WPF chatting system

  4. #4

    Thread Starter
    Addicted Member
    Join Date
    Feb 2006
    Location
    Hyderabad, India
    Posts
    233

    Re: MS-Access Remote connection

    If you have observed the code that I have posted two lines have been commented out :
    VB Code:
    1. set rs= new adodb.recordset
    2. rs.open "todaydeal",conn,adopenkeyset,adlockoptimistic,adcmdtable

    If I uncomment these lines it is giving error, otherwise no.

  5. #5
    Software Carpenter dee-u's Avatar
    Join Date
    Feb 2005
    Location
    Pinas
    Posts
    11,127

    Re: MS-Access Remote connection

    Have a look at the example of RhinoBull, it may be of help...
    Regards,


    As a gesture of gratitude please consider rating helpful posts. c",)

    Some stuffs: Mouse Hotkey | Compress file using SQL Server! | WPF - Rounded Combobox | WPF - Notify Icon and Balloon | NetVerser - a WPF chatting system

  6. #6

    Thread Starter
    Addicted Member
    Join Date
    Feb 2006
    Location
    Hyderabad, India
    Posts
    233

    Re: MS-Access Remote connection

    Thank you for sparing your time.
    There is not much difference in the my code and the code posted by Rhino Bull. May be it has something to do with configuring the IIS. If I enable anonymous access , error is "Internet server error" . If I disable anonymous access, at the time of connecting a dialog box is displayed asking my user name and password. I tried all the accounts but access is denied and the error is "Access denied". ( I have installed IIS on my windows XP machine and I am using the user name and password that I use to log in to my machine). I have tried using the administrator account for anonymous access. In that case error is
    microsoft ado/rds
    -2147012866
    Interne Client Error (0x80072efe)
    Now what do I do?

Posting Permissions

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



Click Here to Expand Forum to Full Width