"access denied" en executant openrecordset.seek
Bonjour à tous,
j'ai un code sur vb6, ça marchait très bien sur win XP. Sur win7 ça bloque
voici le code :
Code:
1 2 3 4 5 6
|
Dim recADO As ADODB.Recordset
'remplir recADO
If Not (recADO.BOF And recADO.EOF) Then
Tb.Seek "=", recADO("var1"), recADO("var2"), recADO("var3"), recADO("var4")
End If |
the "seek" function generates this error " err.number=10000 err.description=Access Violation".
De cette façon :
Code:
1 2 3 4 5 6 7 8 9 10 11
|
Dim recADO As ADODB.Recordset
Dim ado1,ado2,ado3,ado4 as string
'remplir recADO
ado1 = recADO("var1")
ado2 = recADO("var2")
ado3 = recADO("var3")
ado4 = recADO("var4")
If Not (recADO.BOF And recADO.EOF) Then
Tb.Seek "=", ado1, ado2, ado3, ado4
End If |
Il fonctionne très bien
quelqu'un peut il m'aider comprendre quel est le problème ?? :arf: