bonjour jai une fonction ki ne marche pa je ne compren pas voici le code :
Public Function monRecordset(monRecordset, maconnexion, marequete) As ADODB.Recordset
If monRecordset.ActiveConnection Is Nothing Then monRecordset.ActiveConnection = SQLSRVDATA.EASYMED.ConnectionString
If SQLSRVDATA.maconnexion.State = 0 Then SQLSRVDATA.maconnexion.Open
Set monRecordset = SQLSRVDATA.maconnexion.Clone
monRecordset.Close
monRecordset.Source = marequete
monRecordset.Open , , adOpenDynamic, adLockReadOnly
End Function
le souci c ke je recoi un msg derreur ki me di ke je sor du bloc defini je compren pa tro...
je vous envoie le code original au cas ou...:
Dim RstSMR As New ADODB.Recordset
If RstSMR.ActiveConnection Is Nothing Then RstSMR.ActiveConnection = SQLSRVDATA.EASYMED.ConnectionString
If SQLSRVDATA.rsTblTypeSMR.State = 0 Then SQLSRVDATA.rsTblTypeSMR.Open
Set RstSMR = SQLSRVDATA.rsTblTypeSMR.Clone
RstSMR.Close
RstSMR.Source = "insert into TBLAPTITUDE(IDAPTITUDE, LIBELLEAPTITUDE) values (" & TxtIdSMR.Text & ",'" & TxtLibelleSMR.Text & "')"
RstSMR.Open , , adOpenDynamic, adLockReadOnly
merci d'y preter attention