CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Thread: Database Access

  1. #1
    Join Date
    Nov 2000
    Location
    IL, U.S.A.
    Posts
    218

    Database Access

    I still am having problems accessing my database through my Adodc control.
    I put the database in the came folder as the program and in the data link properties
    under the connection tab i put the database name.
    I also code in the Private Sub Form_Laod()
    Dim dbName As String
    dbName = App.Path & "\NameandPassords.mdb"
    It still will not access the database. What am I doing wrong?


  2. #2
    Join Date
    Apr 2001
    Location
    canada
    Posts
    12

    Re: Database Access

    Hi,

    This is how I connected to an Access database.
    Try this
    dim cnn as connection

    Set cnn = New ADODB.Connection
    cnn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.3.51;Persist Security Info=False;Data Source=C:\working\db1.mdb"
    cnn.CursorLocation = adUseClient
    cnn.Open

    I hope this helps
    Sam


  3. #3
    Join Date
    Nov 2000
    Location
    IL, U.S.A.
    Posts
    218

    Re: Database Access

    Thanks!! I'll try that.


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

Featured