navigation
a webmaster learning community
     Home    Register     Search      Help      Login    
FrontPage Alternative
Sponsors

Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions.

Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.

Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

Search Forums
 

Advanced search
Recent Posts

 Todays Posts
 Most Active posts
 Posts since last visit
 My Recent Posts
 Mark posts read

 

RE: Incorrect results

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> ASP and Database >> RE: Incorrect results
Page: <<   < prev  1 [2]
 
Spooky

 

Posts: 26606
Joined: 11/11/1998
From: Middle Earth
Status: offline

 
RE: Incorrect results - 10/31/2003 18:52:24   
<%MValue = (FP_Field(fp_rs,"yourpayment"))%>
<%MValue1 = (FP_Field(fp_rs,"yourcharges"))%>

If using FP_FieldVal() it inserts &nbsp; if the record is blank - you dont want that. So use the function above.

The code I showed you needs to go in the same place as although you have set the value to "0" further up the code, it gets reset to whatever the database value is when called again.

_____________________________

If you arent part of the solution, then there is good money to be made prolonging the problem

§þ:)


(in reply to Light)
Light

 

Posts: 200
Joined: 3/28/2002
From: Earth
Status: offline

 
RE: Incorrect results - 10/31/2003 19:45:20   
I insert your code in different area but the error message is still the same!

<!--#include file="../_fpclass/fpdblib.inc"-->

<%
fp_sQry="SELECT Sum(charge.Charge_amount) AS YourCharges, (select sum(pay.pay_amount) from pay where pay.student_number='::student_number::') AS YourPayment FROM charge where charge.student_number ='::student_number::';"
fp_sDefault=""
fp_sNoRecords="No records returned."
fp_sDataConn="bursar"
fp_iMaxRecords=256
fp_iCommandType=1
fp_iPageSize=0
fp_fTableFormat=False
fp_fMenuFormat=False
fp_sMenuChoice=""
fp_sMenuValue=""
fp_iDisplayCols=3
fp_fCustomQuery=False
BOTID=0
fp_iRegion=BOTID
%>

<%dim MValue: mvalue=0%>
<%dim MValue1: mvalue1=0%>
<%dim MValue2: mvalue2=0%>
<%
If MValue1 = "" then MValue1 = 0
If MValue = "" then MValue = 0
MValue2 = MValue1-MValue
%>

<!--#include file="../_fpclass/fpdbrgn1.inc"-->


<%MValue = (FP_FieldVal(fp_rs,"yourpayment"))%>
<%MValue1 = (FP_FieldVal(fp_rs,"yourcharges"))%>
<%MValue2 = MValue1-MValue%>


<!--#include file="../_fpclass/fpdbrgn2.inc"-->

Error Type:
Microsoft VBScript runtime (0x800A000D)
Type mismatch: '[string: "& n b s p"]'

(in reply to Light)
Spooky

 

Posts: 26606
Joined: 11/11/1998
From: Middle Earth
Status: offline

 
RE: Incorrect results - 10/31/2003 22:46:20   
You need to change both as the example I gave :

<!--#include file="../_fpclass/fpdbrgn1.inc"-->

<%
MValue = (FP_Field(fp_rs,"yourpayment"))
MValue1 = (FP_Field(fp_rs,"yourcharges"))

If MValue1 = "" then MValue1 = 0
If MValue = "" then MValue = 0
MValue2 = cInt(MValue1)-MValue
%>

<!--#include file="../_fpclass/fpdbrgn2.inc"-->

_____________________________

If you arent part of the solution, then there is good money to be made prolonging the problem

§þ:)


(in reply to Light)
Light

 

Posts: 200
Joined: 3/28/2002
From: Earth
Status: offline

 
RE: Incorrect results - 11/1/2003 0:06:46   
Hi Spooky without your help I don't know what I could do! thanks a lot
I really appreciate your time and patient, now it's working great.
:)

(in reply to Light)
Light

 

Posts: 200
Joined: 3/28/2002
From: Earth
Status: offline

 
RE: Incorrect results - 1/31/2004 2:08:58   
Hi Spooky it's me again, every thing was working Ok, just I wanted to test biger number like 20000 or more now I'm getting the following error, I'm now confused!:)

Error Type:
Microsoft VBScript runtime (0x800A0006)
Overflow: 'CInt'
/cahsu/hqbursar/detail.asp, line 120


I found that the max limit for <%=MValue2%> is 32766 more than this the error will
Occur!


< Message edited by Light -- 1/31/2004 2:48:08 >

(in reply to Light)
Page:   <<   < prev  1 [2]

All Forums >> Web Development >> ASP and Database >> RE: Incorrect results
Page: <<   < prev  1 [2]
Jump to: 1





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts