Advertisement

09.07.2005 at 06:04PM PDT, ID: 21554100
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

5.8

Problem With Loop

Asked by vico1 in Active Server Pages (ASP)

Tags: ,

I have this Query:
------------------------------------------------------------------------
<%
on error resume next

toLF="0"
tRAM="0"
tCostOLF=FormatCurrency(0)
tCostRAM=FormatCurrency(0)

set objConnection=Server.CreateObject("ADODB.Connection")
objConnection.ConnectionTimeout = 15
objConnection.CommandTimeout = 10
objConnection.Mode = 3 'adModeReadWrite
if objConnection.state = 0 then

  objConnection.Open "Site0001"
end if
'------------------------------------OLF
strSQL = "SELECT Count(*) AS oLF, SUM(TB_AMOUNT) AS CostOLF FROM TRANBODY WHERE ([TB_CATEGOR] = 'PAC-OLF' AND [TB_DATE]=DATE());"
set objRS=Server.CreateObject("ADODB.RecordSet")

objRS.Open strSQL,objConnection,3,3

if objRS.eof = False Then

   toLF=objRS("oLF")
   tCostOLF=FormatCurrency(objRS("CostOLF"))

end If

'Color

'-----------------------------------RAM
strSQLB = "SELECT Count(*) AS RAM, SUM(TB_AMOUNT) AS CostRAM FROM TRANBODY WHERE ([TB_CATEGOR] = 'PAC-RAM' AND [TB_DATE]=DATE());"
set objRS=Server.CreateObject("ADODB.RecordSet")
objRS.Open strSQLB,objConnection,3,3

if objRS.eof = False Then
   tRAM=objRS("RAM")
   tCostRAM=FormatCurrency(objRS("CostRAM"))
end If
'Color

'Last Line

objRS.Close
Set objRS = Nothing

objConnection.close
set objConnection = Nothing
%>
-------------------------------------------------------------------------
Then I tried to make a loop:


<%
Dim Site
Site="1"
%>

<%
Do While Site<3

on error resume next

S'Site'toLF="0"
S'Site'tRAM="0"
S'Site'tCostOLF=FormatCurrency(0)
S'Site'tCostRAM=FormatCurrency(0)

set objConnection=Server.CreateObject("ADODB.Connection")
objConnection.ConnectionTimeout = 15
objConnection.CommandTimeout = 10
objConnection.Mode = 3 'adModeReadWrite
if objConnection.state = 0 then

  objConnection.Open "Site000"&'Site'
end if
'------------------------------------OLF
strSQL = "SELECT Count(*) AS oLF, SUM(TB_AMOUNT) AS CostOLF FROM TRANBODY WHERE ([TB_CATEGOR] = 'PAC-OLF' AND [TB_DATE]=DATE());"
set objRS=Server.CreateObject("ADODB.RecordSet")

objRS.Open strSQL,objConnection,3,3

if objRS.eof = False Then

   S'Site'toLF=objRS("oLF")
   S'Site'tCostOLF=FormatCurrency(objRS("CostOLF"))

end If

'Color

'-----------------------------------RAM
strSQLB = "SELECT Count(*) AS RAM, SUM(TB_AMOUNT) AS CostRAM FROM TRANBODY WHERE ([TB_CATEGOR] = 'PAC-RAM' AND [TB_DATE]=DATE());"
set objRS=Server.CreateObject("ADODB.RecordSet")
objRS.Open strSQLB,objConnection,3,3

if objRS.eof = False Then
   S'Site'tRAM=objRS("RAM")
   S'Site'tCostRAM=FormatCurrency(objRS("CostRAM"))
end If
'Color

'Last Line

objRS.Close
Set objRS = Nothing

objConnection.close
set objConnection = Nothing
Site=Site+1
Loop

%>

But it doesn't work.
Why?
Can you Guys help me?Start Free Trial
[+][-]09.07.2005 at 07:07PM PDT, ID: 14841555

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.07.2005 at 07:16PM PDT, ID: 14841591

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.07.2005 at 07:17PM PDT, ID: 14841597

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09.07.2005 at 07:22PM PDT, ID: 14841626

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09.07.2005 at 08:02PM PDT, ID: 14841746

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.07.2005 at 11:47PM PDT, ID: 14842486

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.07.2005 at 11:48PM PDT, ID: 14842488

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.08.2005 at 06:11AM PDT, ID: 14844050

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09.08.2005 at 06:33AM PDT, ID: 14844224

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.08.2005 at 06:43AM PDT, ID: 14844298

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.08.2005 at 06:45AM PDT, ID: 14844314

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09.08.2005 at 06:46AM PDT, ID: 14844325

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]09.08.2005 at 06:58AM PDT, ID: 14844432

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09.08.2005 at 07:00AM PDT, ID: 14844453

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.08.2005 at 07:01AM PDT, ID: 14844463

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.08.2005 at 07:06AM PDT, ID: 14844517

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09.08.2005 at 07:15AM PDT, ID: 14844608

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.08.2005 at 10:02AM PDT, ID: 14846216

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09.08.2005 at 03:20PM PDT, ID: 14848559

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.10.2005 at 06:31AM PDT, ID: 14856023

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09.10.2005 at 08:52PM PDT, ID: 14858034

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Active Server Pages (ASP)
Tags: error, olf
Sign Up Now!
Solution Provided By: kiddanger
Participating Experts: 5
Solution Grade: A
 
 
[+][-]09.11.2005 at 07:44AM PDT, ID: 14859217

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09.11.2005 at 03:57PM PDT, ID: 14860739

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.11.2005 at 04:42PM PDT, ID: 14860875

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09.11.2005 at 05:01PM PDT, ID: 14860922

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.12.2005 at 04:58PM PDT, ID: 14868365

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09.13.2005 at 02:39AM PDT, ID: 14870256

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.13.2005 at 05:22AM PDT, ID: 14870862

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09.13.2005 at 05:37AM PDT, ID: 14870954

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.13.2005 at 07:29AM PDT, ID: 14872037

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09.13.2005 at 08:32AM PDT, ID: 14872692

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.13.2005 at 08:39AM PDT, ID: 14872774

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09.13.2005 at 09:06AM PDT, ID: 14873060

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.13.2005 at 09:08AM PDT, ID: 14873068

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.13.2005 at 09:18AM PDT, ID: 14873168

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09.13.2005 at 09:19AM PDT, ID: 14873174

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09.13.2005 at 09:19AM PDT, ID: 14873184

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.13.2005 at 09:21AM PDT, ID: 14873194

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09.13.2005 at 09:22AM PDT, ID: 14873211

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.15.2005 at 06:35AM PDT, ID: 14889083

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09.15.2005 at 09:53AM PDT, ID: 14891035

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32