I am trying to implement a call to a SQL Server stored procedure from asp with perlscript webpage. The procedure def is:
Create Procedure DocDetailProc( @strID varchar(20) = '04971', @strName varchar(100) = '' OUTPUT, @strMainHtml varchar(8000) = '' OUTPUT, @strPracHtml varchar(8000) = '' OUTPUT)
The applicable asp section is:
$ID = $Request->QueryString('Key')->Item(1); use Win32::OLE::Const 'Microsoft ActiveX Data Objects 2.5'; $Conn = $Server->CreateObject("ADODB.Connection"); $cmd = $Server->CreateObject("ADODB.Command"); $Conn->Open("Provider=SQLOLEDB;DATA SOURCE=mis-interdev;UID=myUID;P +WD=myPWD;DATABASE=myDB;"); $cmd->{ActiveConnection} = $Conn; $cmd->{CommandType}=adCmdStoredProc; $cmd->{CommandText}='DocDetailProc'; $cmd->Parameters->Refresh(); $cmd->Parameters->{@strID}->{Value}=$ID; $cmd->Execute(); $Name=$cmd->Parameters->{@strID}->{Value}; $MainHtml=$cmd->Parameters->{@strMainHtml}->{Value}; $PracHtml=$cmd->Parameters->{@strPracHtml}->{Value}; %> <td width="585" align="left" height="18"><font face="Verdana" size= +"2"><%=$Name%> </font></td> <td width="253" align="center" rowspan="3" height="88"> </tr> <tr> <td width="185" valign="baseline" align="left" height="19"><strong +><small><font face="Verdana">Specialties</font></small></strong></td> <% $Response->Write($cmd->Parameters->{@strMainHtml}); $Response->Write($cmd->Parameters->{@strPracHtml}); $Conn->Close;
I've seen different ways of doing this, and the examples I've tried to implement do not work correctly. The full code gets no syntax errors, but the fields @strName, @strMainHtml and @strPracHtml are blank. I'm new at this. Any suggestions would be wonderful! Thanks!

In reply to ASP Perlscript and stored procedures by Ginger

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.