Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2006
    Posts
    157

    Unanswered: Need help in connection string

    I am getting syntax error on .con and App? Can any one please help me out. I am using vb.net 2010

    Thanks

    Public Class Form1
    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    With con
    .Provider = "Microsoft.jet.OLEDB.4.0.Provider"
    .ConnectionString = App.Path & "\db1.mdb"
    .Open()
    End With
    End Sub
    End Class
    Attached Thumbnails Attached Thumbnails error1.jpg  

  2. #2
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    It doesn't appear that the App or con variables have been defined. You can't reference variables unless you define them.

    -PatP
    In theory, theory and practice are identical. In practice, theory and practice are unrelated.

Posting Permissions

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