Sorry for the confusion:
The SP does not give me all the values selected in my select statement when I display the values on my ASP page. However, when I write the same SQL statement on the ASP and execute it, I'll get all the selected values:
Here is how I've tested:
'Execute sp
Set objCmd = Server.CreateObject("ADODB.Command")
objCmd.ActiveConnection = cn
objCmd.CommandText = "AllRecByApp"
objCmd.CommandType = adCmdStoredProc
objCmd.Parameters.Append objCmd.CreateParameter("uid",adInteger,adParamInpu t,,uId)
Set rs1 = objCmd.Execute
Set objCmd = Nothing
arr1 = rs1.getRows()
FOR row=0 TO UBOUND(arr1, 2)
FOR col=0 TO UBOUND (arr1, 1)
response.write arr(col,row)&"<br>"
NEXT
NEXT
The for loop above does not print all the selected values in SP
'SQL string on ASP page
strSQL = "SELECT a, b, c, d, e, and so on "_
& " FROM tblApps"_
& " WHERE appId = '"&uId&"';"
Set rs2 = Server.CreateObject("ADODB.RECORDSET")
rs2.open strSQL, cn, adOpenStatic, adLockReadOnly, adCmdText
arr2 = rs2.getRows()
FOR row=0 TO UBOUND(arr2, 2)
FOR col=0 TO UBOUND (arr2, 1)
response.write arr(col,row)&"<br>"
NEXT
NEXT
This FOR loop print all the selected values and the SQL statement for this recordset is exactly the same as SP.
Hope this clarify what I'm saying.
Nirav
Quote:
quote:Originally posted by planoie
Quote:
quote:Originally posted by niravp
|
Quote:
When I invoke this SP from my ASP page I do not get all the selected values on my ASP page. However, I am execute the same select statement directly from my ASP page I get all the selected values.
|
Could you please clarify this? This statement reads to me that it both works and doesn't work.
Peter
------------------------------------------------------
Work smarter, not harder.
|