Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Connection to Access Database

Status
Not open for further replies.

tempoman

Programmer
May 9, 2000
41
0
0
AU
I am a newbie to Visual Basic .NET and would like to know the code to connect to a access 2000 database.

Thank You

Richard
 
Just make a new Databaseconnection in the server and drag and drop this to your application. Then create a new dataadapter and follow the wizard.
 
OR:

To do it manually (rather than use the wizard):

Const ConnStrNWind As String = "Provider=Microsoft.Jet.OLEDB.4.0;Password="""";User ID=Admin;Data Source=C:\Program Files\Microsoft Office\Office\Samples\Northwind.mdb;Mode=Share Deny None;Extended Properties="""";Jet OLEDB:System database="""";Jet OLEDB:Registry Path="""";Jet OLEDB:Database Password="""";Jet OLEDB:Engine Type=5;Jet OLEDB:Database Locking Mode=1;Jet OLEDB:Global Partial Bulk Ops=2;Jet OLEDB:Global Bulk Transactions=1;Jet OLEDB:New Database Password="""";Jet OLEDB:Create System Database=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"

Private Sub OpenNwConnection()

NWindConn.ConnectionString = ConnStrNWind
NWindConn.Open()

End Sub "Life is full of learning, and then there is wisdom"
 
How do you make a new database connection to the server?

I am using SQL Server 7.0 and XP pro with IIS,

THanks,

Tom
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top