User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the VB.NET section within the Software Development category of DaniWeb, a massive community of 397,974 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,944 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our VB.NET advertiser:
Sep 11th, 2006
Views: 3,819
Code for connecting to Microsoft Access databse, opening and closing connection
vbnet Syntax | 4 stars
  1. Dim cn As New OleDbConnection
  2. cn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=|DataDirectory|Data.mdb;Persist Security Info=True"
  3. cn.Open()
  4. cn.Close()
Comments (Newest First)
kavithabhaskar | Junior Poster | Jul 18th, 2008
did you add a header to it ? add 'imports system.data.oledb' as the header and try
dengbadeng | Newbie Poster | Feb 24th, 2008
hello sir. i tried that code but it doesn't work. it says that it's not defined. what should i do?
Post Comment

Only community members can submit or comment on code snippets. You must register or log in to contribute.

DaniWeb Marketplace (Sponsored Links)
All times are GMT -4. The time now is 12:41 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC