Forums
This topic is locked
SUM Fields During Record Searching (Help needed)
Posted 14 May 2004 19:31:20
1
has voted
14 May 2004 19:31:20 abdul jabbar Ishaqani posted:
Below is the Record Searching Code. I m using Dreamweaver MX for Database quering and other task in ASP. I want to set SUM Calculation During Search, means when i search ITMDSC, IMPNAM OR PRTSHP Fields using "data1","data2" and "data5" form fields, It Shows me the SUM TOTAL of "CNTRNR" AND "QTY" Fields.Other thing that i want, Recordset Result on seperate page and SUM TOTAL Summry on the Seperate page during one action.
Please Help me i am anxiously waiting...my work has stopped i have to show it day after tommorow. I have also stucked in some other task of ASP and data development...I will ask very soon but at the moment it is urgent.
Thanks and Regards
<%
varField1 = Replace(Request("data1"


varField2 = Replace(Request("data2"


varField3 = Replace(Request("data5"


SQLstring = "SELECT * FROM 652 WHERE ID <> -1" ' This will return all results
AndString = ""
If varField1 <> "" Then
AndString = AndString & " AND ITMDSC LIKE '%" & varField1 & "%'"
End If
If varField2 <> "" Then
AndString = AndString & " AND IMPNAM LIKE '%" & varField2 & "%'"
End If
If varField3 <> "" Then
AndString = AndString & " AND PRTSHP LIKE '%" & varField3 & "%'"
End If
SQLstring = SQLstring & AndString
%>
<%
set cntrdata = Server.CreateObject("ADODB.Recordset"

cntrdata.ActiveConnection = "dsn=data;"
cntrdata.Source = SQLstring
cntrdata.CursorType = 0
cntrdata.CursorLocation = 2
cntrdata.LockType = 3
cntrdata.Open
cntrdata_numRows = 0
%>
Replies
Replied 14 May 2004 19:58:23
14 May 2004 19:58:23 Dave Thomas replied:
I've removed your post in the other forum, please post your question in one place only.
Regards,
Dave
[DWMX 2004]|[FlashMX 2004 Pro]|[Studio MX 2004]|[SQL]|[Access2000/2002]|[ASP/VBScript]|[XP-Pro]
If you like online gaming, please register @ www.nova-multigaming.com
Regards,
Dave
[DWMX 2004]|[FlashMX 2004 Pro]|[Studio MX 2004]|[SQL]|[Access2000/2002]|[ASP/VBScript]|[XP-Pro]
If you like online gaming, please register @ www.nova-multigaming.com