Article ID: 192666
Article Last Modified on 3/7/2005
/*
(
@parameter1 datatype = default value,
@parameter2 datatype OUTPUT
)
*/
As
/* set nocount on */
return
Paste the recently copied text at the beginning this newly created file.
Immediately following the pasted text add the command RETURN.
CREATE PROCEDURE byroywret @percentage int AS select au_id from titleauthor where titleauthor.royaltyper = @percentage
return
function Button1_onclick() {
// Hide the button, textbox, and label
Button1.hide();
Textbox1.hide();
Label1.hide();
// give the recordset the data from the textbox for use in
// its parameter. Stored procs are numbered starting at 1 if they
// have a RETURN value, as the RETURN value is in index 0.
Recordset1.setParameter(1,Textbox1.value);
Recordset1.open();
// grab the return value out of index 0
var intRetVal = Recordset1.getParameter(0)
Response.Write("The return value is ");
Response.Write(intRetVal);
}
If your default scripting language is VBScript inside the newly created
sub or function, add the following code:
Sub Button1_onclick()
' hide the button, textbox, and label
Button1.hide()
Textbox1.hide()
Label1.hide()
'Give the recordset the data from the textbox for use in
'its parameter. Stored procs are numbered starting at 1 if they
'have a RETURN value, as the RETURN value is in index 0.
Recordset1.setParameter 1, Textbox1.value
Recordset1.open()
'grab the return value out of index 0
intRetVal = Recordset1.getParameter(0)
Response.Write("The return value is ")
Response.Write(intRetVal)
End Sub
Keywords: kbhowto kbstoredproc kbctrl KB192666