Original content

Protected by Copyscape Plagiarism Checker

Sunday, April 18, 2010

VB.NET and MS Access ODBC Connection

Dim con_string As String

con_string = "Driver={Microsoft Access Drive(*.mdb)};DBQ=C:\test.mdb;"

Dim con As New Odbc.OdbcConnection(con_string)

Try

      con.Open()

            MsgBox("Database is open")

      Catch ex As Exception

            MsgBox("Cannot open the database:" + ex.ToString)

End Try

No comments:

Post a Comment