M
muyBN
This is my macro code...:
Sub ToDB()
Dim csConn, rsRecSet As Recordset, strSQL As String, strUser As String
strSQL = "INSERT INTO jbDBTable (CO, CREATED) VALUES ('xyz', date())"
Set csConn = CreateObject("adodb.connection")
csConn.ConnectionString = "data source=C:\Data\0\jbDB.mdb;
Provider=Microsoft.Jet.OLEDB.4.0;"
Set rsRecSet = CreateObject("adodb.recordset")
rsRecSet.Open strSQL, csConn
csConn.Close
End Sub
....and this is my error with bugs:
Run-time error: '3709':
The connection cannot be used to perform this operation. It is either closed
or invalid in this context.
Any answers?
Sub ToDB()
Dim csConn, rsRecSet As Recordset, strSQL As String, strUser As String
strSQL = "INSERT INTO jbDBTable (CO, CREATED) VALUES ('xyz', date())"
Set csConn = CreateObject("adodb.connection")
csConn.ConnectionString = "data source=C:\Data\0\jbDB.mdb;
Provider=Microsoft.Jet.OLEDB.4.0;"
Set rsRecSet = CreateObject("adodb.recordset")
rsRecSet.Open strSQL, csConn
csConn.Close
End Sub
....and this is my error with bugs:
Run-time error: '3709':
The connection cannot be used to perform this operation. It is either closed
or invalid in this context.
Any answers?