Wath is the best method to open access table with jet 4.0 to use Add.new ?
Actually i use:
Set RST = New ADODB.Recordset
RST.Open "table1", CONN, adOpenDynamic, adLockOptimistic
my conn:
Code:
Public Sub APRI_CONNESSIONE()
On Error GoTo Err_SomeName
Dim PC_OPERANTE As String
PC_OPERANTE = Environ$("COMPUTERNAME")
Set CONN = New ADODB.Connection
With CONN
.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\temp\dbtest.mdb;Persist Security Info=False"
.CommandTimeout = 1000
.ConnectionTimeout = 1000 'Tempo in mS prima che il tentativo di connessione vada in TimeOut
.CursorLocation = adUseClient
.Open
End With
Exit_SomeName:
Exit Sub
Err_SomeName:
MsgBox Err.Number & Err.Description
Resume Exit_SomeName
End Sub
please explain me also about cursor type, i think is important to leran speed up conn and open recordset...
- 2 views