I am trying to create a simple connection to a Access DB
and receive the following OleDbException error
System.Data.Ole Db.OleDbExcepti on: Unspecified error at
System.Data.Ole Db.OleDbConnect ion.ProcessResu lts(Int32
hr) at
System.Data.Ole Db.OleDbConnect ion.InitializeP rovider() at
System.Data.Ole Db.OleDbConnect ion.Open() at
RepNetWeb.Event s.BindData() in
C:\projects\kuh ns\repIntranet\ repNetWeb\Pages \Events\Event
s.aspx.vb:line 47
I am using the following code in
Sub BindData()
Dim ConnectionStrin g As String
= "Provider=Micro soft.Jet.OLEDB. 4.0;Data Source=" & _
Server.MapPath( "..\..\Files\dB \KBWEB.MDB")
Dim QuerySQL As String = "SELECT * FROM KBEVENTS"
Dim objConn As New OleDbConnection
(ConnectionStri ng)
Dim objCmd As New OleDbCommand(Qu erySQL, objConn)
Try
objConn.Open()
dgEvents.DataSo urce = objCmd.ExecuteR eader()
dgEvents.DataBi nd()
Catch ex As OleDbException
lblError1.Text = ConnectionStrin g
lblError2.Text = ex.ToString
Finally
objConn.Close()
End Try
End Sub
The code runs fine on some machines but recieved the
above mentioned errors on others. I have checked the
permisions on the file and the folder and everything is
identical. Any help is greattly appreciated.
Thanks,
and receive the following OleDbException error
System.Data.Ole Db.OleDbExcepti on: Unspecified error at
System.Data.Ole Db.OleDbConnect ion.ProcessResu lts(Int32
hr) at
System.Data.Ole Db.OleDbConnect ion.InitializeP rovider() at
System.Data.Ole Db.OleDbConnect ion.Open() at
RepNetWeb.Event s.BindData() in
C:\projects\kuh ns\repIntranet\ repNetWeb\Pages \Events\Event
s.aspx.vb:line 47
I am using the following code in
Sub BindData()
Dim ConnectionStrin g As String
= "Provider=Micro soft.Jet.OLEDB. 4.0;Data Source=" & _
Server.MapPath( "..\..\Files\dB \KBWEB.MDB")
Dim QuerySQL As String = "SELECT * FROM KBEVENTS"
Dim objConn As New OleDbConnection
(ConnectionStri ng)
Dim objCmd As New OleDbCommand(Qu erySQL, objConn)
Try
objConn.Open()
dgEvents.DataSo urce = objCmd.ExecuteR eader()
dgEvents.DataBi nd()
Catch ex As OleDbException
lblError1.Text = ConnectionStrin g
lblError2.Text = ex.ToString
Finally
objConn.Close()
End Try
End Sub
The code runs fine on some machines but recieved the
above mentioned errors on others. I have checked the
permisions on the file and the folder and everything is
identical. Any help is greattly appreciated.
Thanks,
Comment