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

    Unhappy Unanswered: Failing to connect VB To Access

    Hi all,
    I have included a post just earlier stating that I cannot link Visual Basic due Access due to an error number 3170.

    This is where it is not possible to find the installable ISAM's.

    I have re-installed both Access and VB, updated to windows 2000 service pasck 4 and i am still stunped.

    Please help with any suggestions.


  2. #2
    Join Date
    Mar 2004

    Re: Failing to connect VB To Access

    Are you sure that is the reason? What does your code look like? In the meantime, here is some code to connect to an Access database, reterive data from Table1, close the recordset and close the connection using Visual Basic with ADO:

    Dim cn as ADODB.Connection
    Dim rs as ADODB.Recordset

    Set cn = new ADODB.Connection

    cn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;User ID=Admin;Data Source=C:\Test.mdb;Persist Security Info=False"

    set rs = new ADODB.recordset

    rs.ActiveConnection = cn

    rs.Open "SELECT * FROM Table1"



    Set rs=Nothing
    Set cn = Nothing

    Download for FREE the ADO/DAO Data Controls that makes life EASIER developing database applications in: VB, FoxPro, Access, VC++, .NET etc... Navigate, Add New, Delete, Update, Search, Undo and Save your changes. Supports Disconnected Recordsets and Transactions!

    Or try our Ask An Expert service to answer any of your questions!

Posting Permissions

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