techzone12
Technical User
How can I pass DateTime Paramter to stored procedure from within an ASP page? Can you give me an example - or maybe point me to a link where this is explained?
Thanks
Thanks
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
If using a concatenated string to execute the procedure, you should reformat
the dates to ISO format (yyyymmdd) and concatenate them in as delimited
strings:
[blue]sSQL = "exec myproc '" & "20030101" & "', '" & "20030131" & "'" [/blue]
If using the procedure-as-connection-method technique, just pass them as
normal arguments:
[blue]cn.myproc cdate("01/01/2003"),cdate("01/31/2003")[/blue]
If opening a recordset:
[blue]
set rs = server.createobject("adodb.recordset")
cn.myproc cdate("01/01/2003"),cdate("01/31/2003"), rs
[/blue]