OleDbConnection Connection String for Access database

Imports System
Imports System.Data
Imports System.Data.SqlClient
Imports System.Collections
Imports System.Windows.Forms
Imports System.Resources

Public Class MainClass
Shared Sub Main()
Dim OleDbConnection As System.Data.OleDb.OleDbConnection
OleDbConnection = New System.Data.OleDb.OleDbConnection()

OleDbConnection.ConnectionString = _
“Provider=Microsoft.Jet.OLEDB.4.0;Password=””””;” & _
“User ID=Admin;Data Source=Employee.mdb;Mode=Sha” & _
“re Deny None;Extended Properties=””””;” & _
“Jet OLEDB:System database=””””;Jet OLEDB:Regis” & _
“try Path=””””;Jet OLEDB:Database Password=””””;” & _
“Jet OLEDB:Engine Type=5;Jet OLEDB:Dat” & _
“abase Locking Mode=1;Jet OLEDB:Global Partial ” & _
“Bulk Ops=2;Jet OLEDB:Global Bulk T” & _
“ransactions=1;Jet OLEDB:New Database ” & _
“Password=””””;Jet OLEDB:Create System Databas” & _
“e=False;Jet OLEDB:Encrypt Database=False;” & _
“Jet OLEDB:Don’t Copy Locale on Compact=” & _
“False;Jet OLEDB:Compact Without Replica ” & _
“Repair=False;Jet OLEDB:SFP=False”

Try
OleDbConnection.Open()
OleDbConnection.Close()
Catch ex As Exception
Console.WriteLine(ex.Message)
End Try

End Sub
End Class

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: