Article ID: 172214
Article Last Modified on 7/15/2004
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\W3SVC\ASP
\Parameters
The Parameters key has several subvalues that control ASP. Make sure it
has a subvalue named AllowOutOfProcCmpnts, and that this subvalue is set
to 1.
Public Function PostVariant(varAccountNo As Variant, _
varAmount As Variant, ByRef varResult As Variant) As Variant
Dim lngAccountNo As Long
Dim lngAmount As Long
Dim strResult As String
lngAccountNo = varAccountNo
lngAmount = varAmount
strResult = varResult
PostVariant = Post(lngAccountNo, lngAmount, strResult)
varAccountNo = lngAccountNo
varAmount = lngAmount
varResult = strResult
End Function
<%
Dim Accountobj, Msg
If (Not IsNumeric(Request("Amount")) _
or IsEmpty(Request("Amount"))) Then
Msg = "Please enter the amount of the transaction."
Else
set Accountobj = server.createobject("Bank.Account")
Accountobj.PostVariant Request("AccountID"), _
Request("Type") * Request("Amount"), Msg
End If%>
<%=Msg%>
<BR>
<FORM METHOD="POST" ACTION="MTSBank.asp">
Transaction Type:
<INPUT TYPE="RADIO" NAME="Type" VALUE="1" CHECKED>Credit
<INPUT TYPE="RADIO" NAME="Type" VALUE="-1" >Debit
<BR>
Account ID: <INPUT TYPE="TEXT" NAME="AccountID" SIZE=30 VALUE="1">
<BR>
Amount : <INPUT TYPE="TEXT" NAME="Amount" SIZE=30>
<BR>
<INPUT TYPE="SUBMIT" VALUE="Submit">
</FORM>
Keywords: kberrmsg kbhowto kbsysadmin KB172214