Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP 3.0 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old February 11th, 2008, 07:48 AM
Registered User
 
Join Date: Feb 2008
Location: Hucknall, Nottingham, United Kingdom.
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Server object error 'ASP 0177 : 800401f3'

Hi I've been having problems getting the ExecuteTransfer.asp page working using the elementary banking system described in chapter 16

I get the following error:

Server object error 'ASP 0177 : 800401f3'

Server.CreateObject Failed

/3382Ch16/BeginningASP3/Ch16/ExecuteTransfer.asp, line 22

800401f3

I checked with my hosting company to see if it was a problem on the server side they gave me this reply:
"This does appear like a coding error, Line 21 shows you are trying to create an instance from a object class "BankAccount.WSC" but I do not see this class being defined anywhere on this script and that the script is not refering to any other scripts that may contain the definition of this class" I downloaded the pages direct from this website and checked it against the book so would assume it contains everything I need.

Does the BankAccount.WSC need to be registered on the server by hosting company I have asked them this question but to date insist it is a problem with the script from the book.

Code from two relevant pages:
Page 1: Bank.asp

<HTML>
<HEAD>
<%
  Dim dcBank, rsBank
  Set dcBank = Server.CreateObject("ADODB.Connection")
  Set rsBank = Server.CreateObject("ADODB.Recordset")

dcBank.Open strConn



  rsBank.Open "SELECT * FROM Account", dcBank
  Dim strOptionString
  strOptionString = ""
  Do Until rsBank.EOF
    strOptionString = strOptionString & _
                "<OPTION VALUE='" & rsBank("AccountID") & "'>" & _
                rsBank("HolderName") & " [" & rsBank("AccountID") & "]" & _
                "</OPTION>"
    rsBank.MoveNext
  Loop
  rsBank.Close
  dcBank.Close
  Set rsBank = Nothing
  Set dcBank = Nothing
%>
<TITLE>A First Banking Example</TITLE>
</HEAD>
<BODY>
<H2>Elementary Banking for Very Small Banks</H2>
<H3>Cash Transfer Request - Please enter the following details:</H3>

<FORM ACTION="ExecuteTransfer.asp" METHOD="POST">
  Select source account:
  <SELECT NAME="SourceAccount"> <%= strOptionString %></SELECT><BR>
  Select destination account:
  <SELECT NAME="TargetAccount"> <%= strOptionString %></SELECT><BR>
  Enter check number: <INPUT TYPE="TEXT" NAME="CheckNum" size="20"><BR>
  Enter check amount: $<INPUT TYE="TEXT" NAME="AmtToTransfer" size="20"><BR><BR>
  <INPUT TYPE="SUBMIT" VALUE="Process This Check">
</FORM>
</BODY>
</HTML>

Page 2: ExecuteTransfer.asp

<HTML>
<HEAD><TITLE>A First Banking Example</TITLE>
</HEAD>
<BODY>
<H2>Elementary Banking for Very Small Banks</H2>
<H3>This page will execute your Cash Transfer Request</H3>
<%
  Dim srcAccountID, destAccountID, intCheckNum, dblAmtToTransfer
  Dim srcBalance, destBalance
  Dim strAbortReason, blnSuccess

  intCheckNum = Request.Form("CheckNum")
  dblAmtToTransfer = Request.Form("AmtToTransfer")
  srcAccountID = Request.Form("SourceAccount")
  destAccountID = Request.Form("TargetAccount")

  If srcAccountID = destAccountID Then
    Response.Write "Can't transfer funds when " & _
                   "the source and destination account are the same"
  Else
    Set objSourceAcct = Server.CreateObject("BankAccount.wsc")
    Set objDestAcct = Server.CreateObject("BankAccount.wsc")
    objSourceAcct.AccountID = srcAccountID
    objDestAcct.AccountID = destAccountID

    Response.Write "<B>Prior Balances:</B><BR>" & _
       "Source Account ID: <B>" & objSourceAcct.AccountID & "</B> " & _
       "Balance: <B>$" & objSourceAcct.Balance & "</B><BR>" & _
       "Destination Account ID: <B>" & objDestAcct.AccountID & "</B> " & _
       "Balance: <B>$" & objDestAcct.Balance & "</B>" & _
       "<BR>" & _
       "We are about to transfer <B>" & FormatCurrency(dblAmtToTransfer) & _
       "</B> from the source account to the destination account...<BR>"

    blnSuccess = objSourceAcct.AddMoney (-dblAmtToTransfer, intCheckNum)
    If blnSuccess <> 0 Then
      objDestAcct.AddMoney dblAmtToTransfer, intCheckNum
      Response.Write "<BR><BR>Cash transfered!"
    End If

    Response.Write "<BR><BR>Cash transfered!<BR><BR>" & _
       "<B>Final Balances:</B><BR>" & _
       "Source Account ID: <B>" & objSourceAcct.AccountID & "</B> " & _
       "Balance: <B>$" & objSourceAcct.Balance & "</B><BR>" & _
       "Destination Account ID: <B>" & objDestAcct.AccountID & "</B> " & _
       "Balance: <B>$" & objDestAcct.Balance & "</B>" & _
       "<BR>"
  End If
%>
</HTML>


Can anybody help shed any light on this, I am new to asp but trying to learn:)your help would be greatly appreciated....
Thanks
Liz


liz


Similar Threads
Thread Thread Starter Forum Replies Last Post
Server Object error 'ASP 0177 : 800401f3' geeta Classic ASP Professional 16 July 23rd, 2007 09:41 AM
Error : Server Object, ASP 0177(0x800401F3) InsouciantCoquette Classic ASP Components 2 February 21st, 2006 09:26 PM
Server Object error 'ASP 0177 : 800401f3' geeta Classic ASP Basics 1 July 10th, 2003 06:00 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.