Ado Recordset and Record Count Urgent !!!!
Posted on 2000-04-19
I am trying to execute a stored procedure with one parameter.If i use the recordset.open method i get the record count as 11 and if i use the command object i get the record count as -1
here is the code for the command object
Set oConn = New ADODB.Connection
strConnstring = "DSN=Bull;UID=ram;PWD=rajesh"
oConn.Open strConnstring, ram, rajesh, -1
'Create the ADO Database Connection:
Set oComm = New ADODB.Command
Set oPr = New ADODB.Parameter
Set oComm.ActiveConnection = oConn
oComm.CommandText = "ccc_statementofwork"
oComm.CommandType = adCmdStoredProc
oComm.CommandTimeout = 30000
oPr.Type = adInteger
oPr.Value = 134325
Set recBull = New ADODB.Recordset
recBull.CursorLocation = adUseServer
recBull.CursorType = adOpenDynamic
recBull.LockType = adLockBatchOptimistic
Set recBull = oComm.Execute()
The same stored procedure when used in an asp page using the recordset.open method gives the record count as -1
I really need this quite urgently
Any help will be really appreciated