le manche
Messages postés8Date d'inscriptionmardi 3 janvier 2006StatutMembreDernière intervention10 mars 2006
-
3 mars 2006 à 17:13
cs_ikan
Messages postés30Date d'inscriptionmercredi 11 mai 2005StatutMembreDernière intervention17 février 2009
-
3 mars 2006 à 18:50
est ce que quelqu'un pourrai m'expliquer comment marche cette connexion
a quoi servent ses deux element "adOpenStatic, adLockOptimistic"
Public Sub MyDatabaseConnection(ByVal DataSource As String, ByVal RecSet As ADODB.Recordset, ByVal Connect As ADODB.Connection, ByVal SQLStr As String)
'
On Error Resume Next
RecSet.Close
Connect.Close ConStr "Provider Microsoft.Jet.OLEDB.4.0;Data Source= " & DataSource & "; Persist Security Info=False"
Connect.Open ConStr
RecSet.Open SQLStr, Connect, adOpenStatic, adLockOptimistic
adLockOptimistic,
3,
Indicates optimistic locking, record by record. The provider uses optimistic locking, locking records only when you call the true#mddefcursor cursor used in a Recordset object.
Settings and Return Values
Sets or returns a CursorTypeEnum value. The default value is adOpenForwardOnly .
Remarks
Use the CursorType property to specify the type of cursor that should be used when opening the Recordset object.
Only a setting of adOpenStatic is supported if the CursorLocation property is set to adUseClient. If an unsupported value is set, then no error will result; the closest supported CursorType will be used instead.
If a =true#mddefdataprovider provider does not support the requested cursor type, it may return another cursor type. The CursorType property will change to match the actual cursor type in use when the Recordset object is open. To verify specific functionality of the returned cursor, use the Supports method. After you close the Recordset, the CursorType property reverts to its original setting.
The following chart shows the provider functionality (identified by Supports method constants) required for each cursor type.
For a Recordset of this CursorType |
The Supports method must return True for all of these constants |
----