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:
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)
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)
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.
quote:Originally posted by planoie
quote:Originally posted by niravp
Could you please clarify this? This statement reads to me that it both works and doesn't work.
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.
Work smarter, not harder.