Solved

stored procedure, retrieve data

Posted on 2014-01-24
1
164 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
1 Comment
 
LVL 32

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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Nowadays, some of developer are too much worried about data. Who is using data, who is updating it etc. etc. Because, data is more costlier in term of money and information. So security of data is focusing concern in days. Lets' understand the Au…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.

746 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now