views:

13

answers:

0

Hello;

I'm trynig to connect to a database, but I get this error :

Failed IErrorInfo.GetDescription with E_FAIL (0x80004005)

Dim ReqTest As String
Dim MR As OleDbDataReader
Dim cne, idc As Integer
ReqTest = "SELECT * FROM READ"
MR = Connexion.lecture(ReqTest)
MR.Read()

With :

Public Shared Function lecture(ByVal requete As String) As OleDbDataReader
Dim Mycommand As OleDbCommand = conecter().CreateCommand()
Mycommand.CommandText = requete
Dim myReader As OleDbDataReader = Mycommand.ExecuteReader()
Return myReader
End Function

Thnaks.