I am trying to delete all records from MS Access database.
I am using VB 6.0 code and ADO's to accomplish this.
I keep getting the following error. Runtime error 3704.
Operation is not allowed when the object is closed.
I am using the following code:
Dim adoCon As ADODB.Connection
Dim adoRst As ADODB.Recordset
sSQL = "select * from tbl_XML_Detail"
Set adoCon = New ADODB.Connection
Set adoRst = New ADODB.Recordset
adoCon.ConnectionString = "Schema"
adoCon.CursorLocation = adUseClient
adoCon.Open
Set adoRst.ActiveConnection = adoCon
adoRst.Open sSQL, , adOpenForwardOnly, adLockOptimistic, adCmdText
adoRst.Delete adAffectAll
Pls help..
I am using VB 6.0 code and ADO's to accomplish this.
I keep getting the following error. Runtime error 3704.
Operation is not allowed when the object is closed.
I am using the following code:
Dim adoCon As ADODB.Connection
Dim adoRst As ADODB.Recordset
sSQL = "select * from tbl_XML_Detail"
Set adoCon = New ADODB.Connection
Set adoRst = New ADODB.Recordset
adoCon.ConnectionString = "Schema"
adoCon.CursorLocation = adUseClient
adoCon.Open
Set adoRst.ActiveConnection = adoCon
adoRst.Open sSQL, , adOpenForwardOnly, adLockOptimistic, adCmdText
adoRst.Delete adAffectAll
Pls help..