Error using Command Object 
Author Message
 Error using Command Object

Could somebody help ???

I wrote the following small test program and got the following error:

"the rowset was built over a live data feed and cannot be restarted"

i'm pasting the code that generated this. The line that raised this
error is the one with the "rs.MoveFirst" in it...

Private Sub Command1_Click()
Dim cn As New ADODB.Connection
Dim cmd As New ADODB.Command
Dim prm As ADODB.Parameter
Dim rs As ADODB.Recordset

cn.Open "dsn=tst1", "sa"
Set rs = New ADODB.Recordset

Set cmd.ActiveConnection = cn
cmd.CommandText = "tst2"
cmd.CommandType = adCmdStoredProc

Set prm = cmd.CreateParameter("a", adInteger, adParamInput, 5)
cmd.Parameters.Append prm
cmd("a") = 2
Set rs = cmd.Execute
If rs.EOF And rs.BOF Then
    MsgBox "RS is empty !!!"
    Do Until rs.EOF
        Debug.Print rs.Fields(0) & " " & rs.Fields(1)
End If
MsgBox "END !!!"

'Set cmd = Nothing
Set rs = Nothing
Set cn = Nothing
End Sub

Sat, 29 Jun 2002 03:00:00 GMT  
 [ 1 post ] 

 Relevant Pages 

1. Error Using ADO Command object

2. Error using the Command-object of ADO

3. Sending command to a FoxPro database using ADODB.Command Object

4. Using the ADO Command Object to send an Execute command

5. ADO Command Object using Multiple Connection Objects

6. Using adodb command object with transferspreadsheet

7. Using browser-side ADODB.Command object?

8. using command object

9. Using Stored Procedures As Command Objects

10. Reporting using the command object

11. using a Command Object

12. Using the Command Object w/Parameters


Powered by phpBB® Forum Software