473,503 Members | 2,105 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

sum of a row in a column (classic asp)

2 New Member
hello,

I have a problem with my classic asp page. I want to sum every data in a row when if pages changes. the column data is not in database. I have a formula in the page. I did that in page. but when the page changes it starts over. I need all total sum.
Jan 15 '18 #1
1 6413
oxcor
2 New Member
<table width="100%" border="0" cellspacing="0" cellpadding="2" style="border-collapse:collapse ; border:#eaeaea 0px solid;">
<tr bgcolor="<%=bgcolor%>" onmouseover="this.style.backgroundColor='#FFFFCC'; " onmouseout="this.style.backgroundColor='';">
<td width="5%">No</td>
<td width="25%">Date</td>
<td width="5%">Time</td>
<td width="15%">Track</td>
<td width="10%">Odd</td>
<td width="10%">Profit</td>
<td width="10%">Total</td>
</tr>
</table>





<table width="100%" border="0" cellspacing="0" cellpadding="2" style="border-collapse:collapse ; border:#eaeaea 0px solid;">
<td>
<%
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open "DRIVER={Microsoft Access Driver (*.mdb, *.accdb)}; DBQ=" & Server.MapPath("/HR.accdb")
Set Rs = Server.CreateObject("aDodb.recordSet")
Sor = "Select * from ENGBet365 order by dor desc"
Rs.Open Sor, Conn, 1, 3



If Rs.EOF or Rs.BOF Then
Response.Write "<script language='javascript'>alert('No Records!');</script>"
response.Write "<meta http-equiv='refresh' content='1; URL=?part=england'>"
Response.End
End If
adet=Rs.RecordCount

rownumber=1

syf = Request.QueryString("syf")
If syf="" Then
syf=1
End If

Rs.PageSize = 20
Rs.absolutepage=syf
sayfa=Rs.pagecount
for t=1 to Rs.PageSize
If Rs.EOF Then exit for
if renk mod 2 Then bgcolor = "#FFFFFF" Else bgcolor = "#f7f7f7" end if
%>








<table width="100%" border="0" cellspacing="0" cellpadding="2" style="border-collapse:collapse ; border:#eaeaea 0px solid;">
<tr bgcolor="<%=bgcolor%>" onmouseover="this.style.backgroundColor='#FFFFCC'; " onmouseout="this.style.backgroundColor='';">
<td width="5%"><%=rownumber%></td>
<td width="25%"><%=FormatDateTime(Rs("dor"),1)%></td>
<td width="5%"><%=FormatDateTime(Rs("tor"),4)%></td>
<td width="15%"><%=Rs("track")%></td>
<td width="10%"><%=FormatNumber(Rs("odd"),3)%> </td>
<td width="10%" align="right">
<%
ROR = Rs("Result")
If ROR = 1 Then
Response.Write "<font color=red>"
Response.Write ""&ROR&""
Response.Write "</font>"
Else
Response.Write ""&ROR&""
End If
%>
</td>
<td width="10%" align="right">
<%
Set ATA = Server.CreateObject("aDodb.recordSet")
Sor = "Select * from Settings"
ATA.Open Sor, Conn, 1, 3

ROR = Rs("Result")
If ROR = 1 Then
TOT = ATA("Lia")*(-1)
Response.Write "<font color=red>"
Response.Write FormatNumber(""&TOT&"")
Response.Write "</font>"
Else
TOT = ATA("Lia")/((Rs("Odd"))-1)*FormatNumber(ATA("Commission"),5)
Response.Write FormatNumber(""&TOT&"")
End If

ATA.Close
set ATA=nothing
%>
</td>
<td width="10%" align="right">

<%
total = total + tot
Response.Write FormatNumber(Total,2)
%>

</td>
</tr>

<%
rownumber=rownumber+1
renk=renk + 1
Rs.movenext
next
Rs.Close
set rs=nothing
%>
</table>



</td>
</tr>
</table>



<table width="100%" border="0" cellspacing="0" cellpadding="0" style="border-collapse:collapse ; border:#eaeaea 0px solid;">
<tr>
<td class="grey_ters">
Page :
<%
for y=1 to sayfa
If y=cint(syf ) Then
Response.write (""&y&"")
else
Response.write "<span class=""beyaz""><a href='?part=england&syf="&y&"'> "&y&" </a></span>"
End If
next
%>
</td>
</tr>
</table>
Jan 15 '18 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

6
1864
by: Keith | last post by:
I have been using ASP in it's VBScript form for some time, but I only tend to learn what I need to know as I need to know it, so I am by no means an expert and spend a lot of time on here asking...
22
2847
by: Henry Rolf | last post by:
I need some advice. I was thinking about going with ASP.NET, but after reading this I don't think it would be right for me. http://www.powerasp.com/content/new/asp-and-aspdotnet.asp I have...
3
2121
by: bill | last post by:
I need to open a asp.net web form from a classic asp page, and pass a username and password to the asp.net page. The username and password exist as session variables in the classic asp...
5
2926
by: Velvet | last post by:
Can someone tell me to what process I need to attach to be able to step through my classic ASP code in VS.net 2003. I'm working on an XP box with IIS installed. I also have VS.net 2005 (The...
6
1832
by: John | last post by:
Hello. I believe I've read somewhere that classic .asp pages will still operate correctly with no problems with the .NET 1.1 framework installed on a Windows 2000 Server server. Does anyone know...
5
2292
by: Kent.Gallinger | last post by:
I have a web application that contains asp.net and classic asp pages. I have a vb.net function that I would like to use in one of the classic asp pages. How can I do this? Can I do this? ...
24
5464
by: MikeR | last post by:
What do y'all see for the future of ASP in light of MS decision to replace FrontPage with a new series of development tools? All of them mention ASP.NET, but no mention of the ASP I love. Mike
16
9925
by: Blue Apricot | last post by:
X-No-Archive How long will Classic ASP be supported by Microsoft? Should I start learning ASP.NET? Is it hard if you already know ASP? Blue Apricot
8
2404
by: antonyliu2002 | last post by:
We are extending a web application written in classic ASP long time ago. We will add more components to this web application in ASP.NET 2.0. To use the web application, our web users will have...
11
2279
by: mase | last post by:
I've built a new ASP.NET web app with the CSLA framework. The site runs fine with a small number of users, but once there is any traffic the CPU spikes at 100%. I went through and made many updates...
0
7093
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7287
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
7006
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7467
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5592
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4685
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
1519
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
744
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
397
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.