stored procedure

Results 1 to 2 of 2

Thread: stored procedure

  1. #1
    mountain Guest

    Default stored procedure

    how to make asp script to run such a stored procedure with a parameter:<BR> in my sql server stored procedure,the type of key parameter is datetime while in my asp file i just want to use textboxs to collect &#039year&#039 and &#039month&#039 which are both string.how to combine them and run the stored procedure

  2. #2
    sabya Guest

    Default RE: stored procedure

    the first thing to do is to do client side validation for the date entered(you wouldn&#039t want any database errors would you).presuming you have created the stored procedure you now need to work with the command object of asp.<BR>set conn=server.createobject("adodb.connection")<BR>se t command=server.createobject("adodb.command")<BR>co nn.open(the required parameters)<BR>set command.activeconnection=conn<BR>command.commandty pe=adcmdprocedure<BR>command.commandtext="nameof yor stored procedure"<BR>set firstparameter=command.createparameter("mydate",ad DBTime,adParaminput,4)<BR>command("mydate")=your date<BR>command.execute<BR>this should do it<BR>:-)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •