connection to access2007

adarsh_fj

Member
Joined
Jul 14, 2010
Messages
5
Programming Experience
Beginner
hi all, this is my first vb.net program. i have no idea what the error is all about. please help. below is the code which i wrote.

Imports System.Data.OleDb

dim connectionstring as string

connectionstring = "provider=Microsoft.ACE.OLEDB.12.0;DataSource=C:\Documents and Settings\adarsh.FSC\My Documents\wb.accdb;Jet OLEDB:Database Password=vision;"

Dim conn As OleDb.OleDbConnection

conn = New OleDb.OleDbConnection(connectionstring)
conn.Open()

MsgBox("Strings are Equal() ")


i get the following error when i run the program.

An unhandled exception of type 'System.Data.OleDb.OleDbException' occurred in system.data.dll

please help
 
We have no idea either; that is just Visual Studio telling you than an error occurred. Click "View Exception Detail" and post the detail

Actually, do yourself a bigger favour and read the DW2 link in my signature, section "Creating a Simple Data Application" - that will stop you making the error above because you're clearly following an old tutorial that ignores the modern way to do data access as recommended by Microsoft (in short: your making your life hard work, and writing bad quality code in the process; follow Microsoft's tutorials for an easier way to generate better code)
 
Back
Top