I'm new to stored procedures so if this is common knowledge, please excuse my ignorance.
I'm trying to convert an ASP page that's been around forever to use a stored procedure instead of the straight sql call that it's been doing for years.
Anyway, here's the SP:
The view VW_RUNLOG is big, huge and terribly complex. It returns dozens of fields. I'm able to loop through the results and all of that fun stuff... I'm able to see all of the fields, and everything is cheery EXCEPT one field doesn't show up in the results. The field is a text field named 'comments'. It works find if i call the view, but it doesn't come through if i use the SP.Code:CREATE PROCEDURE SP_fastrunlog ( @runlogdate datetime ) AS SELECT * from VW_RUNLOG WHERE (apptdate = @runlogdate) ORDER BY appttime return GO
I get the same results when i paste the SQL from the view into the SP. And i get the same results when i put just the important code on a page by itself like so:
Alternatly commenting out the SQL commands, the one using the view displays both the name and the comments... using the SP, it only displays the name and not the comments.Code:sql="EXECUTE sp_fastrunlog '2/18/2004'" 'sql="SELECT * FROM VW_RUNLOG WHERE (apptdate = '2/18/2004') ORDER BY appttime" Set rs = server.createobject("adodb.recordset") rs.open SQL,Objconnect,1,1 Do While rs.EOF = False Response.Write "Name: " &rs("name") & " Comments: " & rs("comments") &"<br>" rs.MoveNext LOOP rs.Close set rs = nothing
SO: WTF?










Bookmarks