Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

stored procedure, retrieve data

Posted on 2014-01-24
1
Medium Priority
?
195 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 34

Accepted Solution

by:
Big Monty earned 2000 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

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

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

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
What if you have to shut down the entire Citrix infrastructure for hardware maintenance, software upgrades or "the unknown"? I developed this plan for "the unknown" and hope that it helps you as well. This article explains how to properly shut down …
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
Viewers will learn how the fundamental information of how to create a table.

597 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