Results 1 to 2 of 2

Thread: ado probleme

  1. #1

    Thread Starter
    Lively Member milen's Avatar
    Join Date
    May 2006
    Posts
    116

    ado probleme

    Hii, Guys
    I have my Fournisseur.mdb i want to open it manualy i but this code in my form load but he dosn't work i need your help please this is my code :
    VB Code:
    1. Private Sub Form_Load()
    Adodc1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\WINDOWS\system32\Fournisseur.mdb;Persist Security Info=False"Adodc1.CommandType = adCmdTable
    VB Code:
    1. End Sub
    Now Plaese i want to add the third code that allow me to chose my inscreption table i need code to open my table if you have answer
    thx milen
    regard's
    All This Life ,Just To THINK
    http://www.micronet-dz.com/

  2. #2
    PowerPoster RhinoBull's Avatar
    Join Date
    Mar 2004
    Location
    New Amsterdam
    Posts
    24,132

    Re: ado probleme

    You had it mostly so all you needed was to assign RecordSource property to whatever table name that is:
    VB Code:
    1. Private Sub Command3_Click()
    2.     With Adodc1
    3.         .ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" _
    4.                           & App.Path & "\BIBLIO.MDB;Persist Security Info=False"
    5.         .CommandType = adCmdTable
    6.         .RecordSource = "Authors" '<- assign your table name here
    7.     End With
    8.     Set DataGrid1.DataSource = Adodc1 '<- this line is not necessary - I did it only to test
    9. End Sub

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