Ok, I know I put up a similar question before but im pretty new to this .NET stuff and im not sure if its a problem with my code or if somethings screwy with my installation
First my specs:
Windows 2000 Pro
AMD 2000 processor
I get the below error:
An unhandled exception of type System.Data.OleDb.OleDbException occurred in system.data.dll
What ive tried thus far is install MDAC v2.7 and MS Jet v4.0 SP3 as suggested by the Microsoft site. Still no luck getting VB.NET to connect to my access database.
Im 100% sure the MSJETOLEDB.dll exists in my winnt/system32 directory and most likely isnt corrupt since ive installed it from the packages mentioned above.
Im going to attach my code and snip out a bunch of irrelevant junk. The point where my program complains is highlighted by #######################
Imports System.Data
Imports System.Data.OleDb
Public Class Form1
Inherits System.Windows.Forms.Form
Dim strConnection As String = "Provider=Microsoft.Jet.OLEDB.4.0;" & "_ Data Source=C:\temp\db1.mdb"
Dim mylink As OleDbConnection Connection object
#Region " Windows Form Designer generated code "
Public Sub New()
MyBase.New()
This call is required by the Windows Form Designer.
InitializeComponent()
DATABASE: Make a connection to database
mylink = New OleDbConnection(strConnection)
mylink.Open() ########### CRASH HERE ########
Add any initialization after the InitializeComponent() call
End Sub
// SNIP
End Class
First my specs:
Windows 2000 Pro
AMD 2000 processor
I get the below error:
An unhandled exception of type System.Data.OleDb.OleDbException occurred in system.data.dll
What ive tried thus far is install MDAC v2.7 and MS Jet v4.0 SP3 as suggested by the Microsoft site. Still no luck getting VB.NET to connect to my access database.
Im 100% sure the MSJETOLEDB.dll exists in my winnt/system32 directory and most likely isnt corrupt since ive installed it from the packages mentioned above.
Im going to attach my code and snip out a bunch of irrelevant junk. The point where my program complains is highlighted by #######################
Imports System.Data
Imports System.Data.OleDb
Public Class Form1
Inherits System.Windows.Forms.Form
Dim strConnection As String = "Provider=Microsoft.Jet.OLEDB.4.0;" & "_ Data Source=C:\temp\db1.mdb"
Dim mylink As OleDbConnection Connection object
#Region " Windows Form Designer generated code "
Public Sub New()
MyBase.New()
This call is required by the Windows Form Designer.
InitializeComponent()
DATABASE: Make a connection to database
mylink = New OleDbConnection(strConnection)
mylink.Open() ########### CRASH HERE ########
Add any initialization after the InitializeComponent() call
End Sub
// SNIP
End Class