-
erreur sur datareader
salut j' ai le message d'erreur qui suit
Le type 'System.Data.OleDb.OleDbDataReader' n'a aucun constructeur.
voici le code
Dim thisConnection As OleDbConnection
thisConnection = New OleDbConnection
thisConnection.ConnectionString = "Provider= Microsoft.Jet.OLEDB.4.0; Data source=g:\\fvarango\\pompe.mdb"
thisConnection.open()
Dim thisCommand As OleDbCommand
thisCommand = New OleDbCommand
thisCommand.Connection = thisConnection
thisCommand.CommandType = CommandType.StoredProcedure
Dim thisDataReader As OleDbDataReader
thisDataReader = New OleDbDataReader
thisDataReader = thisCommand.ExecuteReader()
While (thisDataReader.Read)
Dim thisRequete As String
thisRequete = "INSERT INTO TRANSACTION" & _
"(DATE_TRANSACTION,HEURE_TRANSACTION,TYPE_CARBURANT,VOLUME_DELIVRE,MONTANT_TOTAL)" & _
" VALUES ('" & laDate & "','" & heure & "','" & typeDeCarburant & "','" & volume & "','" & montantTTC & "')"
je vois pas d'ou vient l'erreur
-
Cette instruction ne sert à rien :
Code:
thisDataReader = New OleDbDataReader
Le DataReader est créé par l'instruction suivante, pas la peine de le créer explicitement
Utilise les balises CODE stp...