page works on localhost, but not on discountasp

Discussion in 'Classic ASP' started by wisemx, Apr 28, 2007.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. You should DIM the instance objects that haven't been and add temporary variables for some of them so you can debug in classic ASP style, that way you'll know where it stops.


    You should also stop using "include file" for this and use "include virtual" then the actual file path.


    Once you've created a few debug catches come back and post the sections that aren't working. [​IMG]
     
  2. I think I understood you to say- stop letting strange behavior confuse me; simplify the code and debug it logically, right?
    That was good advice. I had stuck in a db reference where I just needed the variable.
    Got it. Thanks!
    Dan
    (I'll try not to be such a baby in the future.)
     
  3. Cool, many of us are only here to help so it's great you resolved this. [​IMG]


    By the way, the only server I currently have with DASP isn't even mine. [​IMG]
     
  4. > Ihave a page that won't play- although it is very similar to other pages that run properly, and it runs on my localhost: Abyss Server with Aprelium ASP support.
    > The failure occurs when loading EnterExp.asp.
    > You can get into it (picking up variables along the way):
    > yepdata.com, 'Get Started';
    > webtime.asp, 'Agent';
    > ALogin.asp, login: 1,1 'Submit';
    > ALog.asp, '4/28/2007';
    > ADayTime.asp, '4/23/2007' (because it contains data)
    > EnterTime.asp, 'Enter Expenses';
    > EnterExp.asp, fails. (EnterTime.asp, 'Enter Hours' works.)
    > I loop through the db a number of times, but this works on other pages-(use the same login- only starting with Administrator, chase the same dates).
    > Any thoughts?
    > Dan

    (small bag of code...)

    <%
    AID=Request.form('AID')
    AName=Request.Form('AName')
    APass=Request.Form('APass')
    CustID=Request.Form('CustID')
    ContractID=Request.Form('ContractID')
    CustName=Request.Form('CustName')
    ContractName=Request.Form('ContractName')
    WeekEnding=Request.Form('WeekEnding')
    ThisDay=Request.Form('ThisDay')
    dim adoCon
    dim rsdbTime
    dim strSQL
    set adoCon = Server.CreateObject('ADODB.Connection')
    adoCon.Open 'Driver={Microsoft Access Driver (*.mdb)}; DBQ=' & Server.MapPath('/_database/dbTime.mdb')
    Set rsdbTime = Server.CreateObject('ADODB.Recordset')
    strSQL = 'SELECT Expense.* From Expense;'
    rsdbTime.cursortype='2'
    rsdbTime.open strSQL, adoCon
    %>
    <!-- #include file='WebTimeTop.txt' -->
    <table width='80%' border='0' cellspacing='0' cellpadding='4'>
    <tr> <td><!-- #include file='SCal.txt' --></td>
    <td align='center'>
    <font color=#0000ff> <h1><%=CustName%></h1>
    <% if ContractName<>'' then%>
    <h1><%=ContractName%></h1>
    <%end if%>
    <h2>Online Time & Expense Reporting:

    <%=AName%></h2></Font>
    </td></tr></table>
    <hr width='80%' align=center color=blue ></center>

    <h3>Reimbursable Personal Auto Mileage:</h3>
    <center><table border='2' cellspacing='0' cellpadding='0'>
    <tr><td ><center>Destination</center> </b></td>
    <td ><center>Miles</center></b></td>
    <td ><center>Amount</center></b></td>
    <td ><center>Notes</center></b></td></tr>
    <%
    rsdbTime.MoveFirst
    do until rsdbTime.eof
    ChkDate=DateValue (rsdbTime('EDate'))
    Result=DateDiff ('n',ChkDate,ThisDay)
    if rsdbTime('EAID')=AID and Result=0 and rsdbTime('PersonalAutoMiles')>0 then
    %>
    <form method='post' action='UpdateMiles.asp'>
    <input type='hidden' value='<%=rsdbTime('EID')%>' name='EID'>
    <input type='hidden' value='<%=AID%>' name='AID'>
    <input type='hidden' value='<%=APass%>' name='APass'>
    <input type='hidden' value='<%=AName%>' name='AName'>
    <input type='hidden' value='<%=ContractID%>' name='ContractID'>
    <input type='hidden' value='<%=CustID%>' name='CustID'>
    <input type='hidden' value='<%=CustName%>' name='CustName'>
    <input type='hidden' value='<%=ContractName%>' name='ContractName'>
    <input type='hidden' value='<%=ThisDay%>' name='ThisDay'>
    <input type='hidden' value='<%=WeekEnding%>' name='WeekEnding'>
    <tr><td><input type='text' value='<%=rsdbTime('EDestination')%>' name='EDestination'></td>
    <td><input type='text' value='<%=rsdbTime('PersonalAutoMiles')%>' name='PersonalAutoMiles'></td>
    <td>$<%=rsdbTime('PersonalAutoMiles')*rsdbTime('DolPerMile')%> @ <%=rsdbTime('DolPerMile')%></td>
    <td><input type='text' value='<%=rsdbTime('ENote')%>' name='ENote'></td>
    <td><input type='submit' value='Update'></input></form></td>
    </font>
     
Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.

Share This Page