Imports System.Data.OleDb
Imports System.Data
Public Class Form2
Public conn As New OleDbConnection
Public Sub connectdata() Handles MyBase.Load
Dim s As String
If conn.State = ConnectionState.Open Then conn.Close()
s = "provider=Microsoft.Jet.OLEDB.4.0;"
s = s + "Data Source=D:\projectsa.mdb;"
s += "user Id=Admin; password=;"
conn.ConnectionString = s
conn.Open()
End Sub
End Class
Tag : .NET, Ms Access, VBScript, Win (Windows App), VB.NET, Windows