Imports System.Data.OleDb
Imports System.Data
Public Class clsDataAccess
Inherits ServicedComponent
Private Shared gstrConnectionString As String
Private mobjConnAccess As OleDbConnection
Public Function DARetrieve(ByVal SqlCmdTxt As String) As DataSet
Dim objDataSet As DataSet
Dim adpOLEDB As new OleDbDataAdapter
If DAConnect() Then
Try
objDataSet = New DataSet
adpOLEDB.SelectCommand = New OleDbCommand(SqlCmdTxt, mobjConnAccess)
adpOLEDB.Fill(objDataSet)
Return objDataSet
Catch ex As Exception
Throw ex
Finally
DAClose()
End Try
End If
End Function
Public Function DAConnect() As Boolean
Try
mobjConnAccess = New OleDbConnection(gstrProduction_ConnectionString)
mobjConnAccess.Open()
Return True
Catch ex As Exception
Throw ex
End Try
End Function
end Class
' I get an error at line 'mobjConnAccess.Open()
The error is "No error information available: E_NOINTERFACE(0x80004002)."
Why? please HElp..
the value of my gstrProduction_ConnectionString is
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=E:\Petronell Back-up\Petronell-TempAcc\Petronell.mdb;Persist Security Info=False
Imports System.Data
Public Class clsDataAccess
Inherits ServicedComponent
Private Shared gstrConnectionString As String
Private mobjConnAccess As OleDbConnection
Public Function DARetrieve(ByVal SqlCmdTxt As String) As DataSet
Dim objDataSet As DataSet
Dim adpOLEDB As new OleDbDataAdapter
If DAConnect() Then
Try
objDataSet = New DataSet
adpOLEDB.SelectCommand = New OleDbCommand(SqlCmdTxt, mobjConnAccess)
adpOLEDB.Fill(objDataSet)
Return objDataSet
Catch ex As Exception
Throw ex
Finally
DAClose()
End Try
End If
End Function
Public Function DAConnect() As Boolean
Try
mobjConnAccess = New OleDbConnection(gstrProduction_ConnectionString)
mobjConnAccess.Open()
Return True
Catch ex As Exception
Throw ex
End Try
End Function
end Class
' I get an error at line 'mobjConnAccess.Open()
The error is "No error information available: E_NOINTERFACE(0x80004002)."
Why? please HElp..
the value of my gstrProduction_ConnectionString is
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=E:\Petronell Back-up\Petronell-TempAcc\Petronell.mdb;Persist Security Info=False