Beginner here trying trying to return a aggregate function value to a text box

ejolson

New member
Joined
Dec 2, 2013
Messages
1
Programming Experience
1-3
Have a project to do where they want me to return an aggregate value to a text box using execute scalar in a 3 layer application. I came up with a procedure/function that basically averaged a column from sqlserver and tried calling this method on the formload but no value was returned to the variable that was created to house the value from the function return. I am a beginner so not sure what I may be doing wrong. Any pointers or starters would be appreciated. Unfortunately, as it did not work I blew it away and saved my project then closed my IDE.
 
If it didn't work then you did it wrong. More than that would be complete speculation based on the information you provided. You obviously already know that you have to call ExecuteScalar and you presumably know how to call a method and assign the result to a variable. You're asking us to perform magic to work out what was wrong with your code. I suggest that you implement it the way you think it should be done and then, if it doesn't work, show us the relevant code and tell us exactly what happens and then we might be able to help.
 
Back
Top