I am unable to open the recordset created using SQL command from Data Environment Designer in VB6. I can see the table that gets created within Access but I cannot use the command MoveFirst to read the recordset sequentially to update the records selectively. Move First command generates the Run-time error ‘3704’: Operation is not allowed when the object is closed. Here is the outline of my code
If I try to insert the following command to open the recordset before rst3.MoveFirst commandvb Code:
Private Sub cmdProcess_Click() Dim de1 As denCovcalc Dim rst2 As Recordset Set de1 = Nothing Set rst3 = Nothing Set de1 = denCovcalc If de1.rscomCovactual.State = 1 Then de1.rscomCovactual.Close End If de1.comCovactual Set rst3 = de1.rscomCovactual rst3.MoveFirstI get the error message that object is already openvb Code:
If de1.rscomCovactual.State = 0 Then de1.rscomCovactual.Open End If
Thanks!




Reply With Quote