Results 1 to 5 of 5
  1. #1
    Join Date
    Apr 2004
    Location
    India
    Posts
    6

    Unanswered: MS Acess with VB6 Over NMetwork

    i m using VB8.0 as front end and MS Acess as backend.
    i want to use this appliaction with Database at network(cleint-server base)
    like databse at server and i want to use this databse at another computer with Vb, how ican do it.

  2. #2
    Join Date
    Mar 2004
    Location
    www.scirocco.ca
    Posts
    346

    Re: MS Acess with VB6 Over NMetwork

    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"

    cn.open

    set rs = new ADODB.recordset

    rs.ActiveConnection = cn

    rs.Open "SELECT * FROM Table1"

    rs.Close

    cn.Close

    Set rs=Nothing
    Set cn = Nothing
    http://www.scirocco.ca/images/banner...occobanner.gif

    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!

  3. #3
    Join Date
    Apr 2004
    Location
    India
    Posts
    6
    My Problem is Connect client Vb application to server application with database

    i asked abt Database connection at cleint not at stand alone computer,
    like i have my Ms Accessa database at Computer one now i want to connect my vb application( which installed at computer2) with computer 1 and want to add, edit and delete functionality.

  4. #4
    Join Date
    Mar 2004
    Location
    www.scirocco.ca
    Posts
    346
    The same code applies you will just change the path of your mdb to the path over the network in the connection string.
    http://www.scirocco.ca/images/banner...occobanner.gif

    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!

  5. #5
    Join Date
    Apr 2004
    Location
    India
    Posts
    6
    this possible that i can access database using Winsock controm if yes then how? plz help me.

Posting Permissions

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