Solved

stored procedure, retrieve data

Posted on 2014-01-24
1
189 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

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

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

For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
This article shows gives you an overview on SQL Server 2016 row level security. You will also get to know the usages of row-level-security and how it works
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.

724 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