Article ID: 182958
Article Last Modified on 6/29/2004
DROP PROCEDURE RowsAffectedTest
go
CREATE PROCEDURE RowsAffectedTest
AS
UPDATE AUTHORS SET ZIP = '99998'
RETURN @@ROWCOUNT
go
Dim SQL As String
Dim cn As rdoConnection
Dim qd As rdoQuery
Dim numberchanged As Integer
Set cn = rdoEnvironments(0).OpenConnection( _
dsname:="", _
Prompt:=rdDriverNoPrompt, _
Connect:="driver={SQL " & _
"server};server=YourServerName;uid=UserName;pwd=StrongPassword;database=pubs")
'Comment out this line when un-commenting the other
SQL = "{Call RowsAffectedTest}"
'Uncomment this line to get the return value
'SQL = "{? = Call RowsAffectedTest}"
Set qd = cn.CreateQuery("MyTest", SQL)
qd.Execute
Debug.Print "RDO RowsAffected Property Value: " & qd.RowsAffected
'Uncomment this line to see the returned value
'Debug.Print "Returned Value From SP: " & qd(0).Value
Additional query words: kbrdo kbVBp400 kbVBp500 kbVBp600 kbdse kbDSupport kbVBp
Keywords: kbprb KB182958