Solved

stored procedure, retrieve data

Posted on 2014-01-24
1
180 Views
Last Modified: 2014-01-30
hi,

the stored procedure works, but, he doesn't goes inside the if

if objRecPeriode0("source") = "agenda" then


how can we change that? thx


the stored procedure sends us back
objRecPeriode0("source") = agenda
objRecPeriode0("nbr") = 5000








<%
CmdPeriode = "exec statgeneral " & _
"@periode=0"	
Set objRecPeriode0 = cn.Execute(CmdPeriode)


do while not objRecPeriode0.eof	
response.write objRecPeriode0("source") & "-" & objRecPeriode0("nbr") & "<br>"
exclu0 = 0
if objRecPeriode0("source") = "agenda" then

exclu0 = exclu0 + objRecPeriode0("nbr")
agenda0 = agenda0 + objRecPeriode0("nbr")

end if 


if objRecPeriode0("source") = "commerce monitor" then
exclu0 = exclu0  + objRecPeriode0("nbr")
commercemonitor0 = commercemonitor0 +  objRecPeriode0("nbr")
end if 


objRecPeriode0.movenext




loop

response.write exclu0
response.write agenda0
response.write commercemonitor0



%>

Open in new window

0
Comment
Question by:fedkris
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 33

Accepted Solution

by:
Big Monty earned 500 total points
ID: 39806605
first thing i would check is to make sure it's returning data, any data, correctly. is the nbr field coming back?

if so, check for trailing whitespaces in the field. change

if objRecPeriode0("source") = "agenda" then

to

if Trim( objRecPeriode0("source") ) = "agenda" then
0

Featured Post

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Via a live example, show how to setup several different housekeeping processes for a SQL Server.

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question