I've a gridview that I'm binding on a dropdownlist select index change event.
I've a stored procedure(which works fine when executed) which i pass in sqlcommand.
when i execute this sqlcommand it returns -1 as its value
what could possibly be wrong as my stored procedure is working find and i just cannot locate the error....
Loading


Amit ChoudharyRank #145 · 15.8K reputationPosted Feb 17, 2010, 9:03 PM EST
you can use SqlDataAdapter to fetch data into a Dataset.
Hadi Kiwan7 reputationPosted Feb 17, 2010, 8:41 PM EST
SivaRamaKrishna Raju43 reputationPosted Feb 17, 2010, 8:45 PM EST
from question i am getting something but not clear
when a statement returns -1 means it is not working well when you place the code then there is a chance to identify the bug.
some queries are work in sql editor but when coming to real work it causes error please check the parameters you passed to it once
Rujuta133 reputationPosted Feb 17, 2010, 8:54 PM EST
The parameters I passsed are right It was some other problem
Amit ChoudharyRank #145 · 15.8K reputationPosted Feb 17, 2010, 8:58 PM EST
Please post the error and stack trace so that i can identify the source of error.
Rujuta133 reputationPosted Feb 17, 2010, 10:27 PM EST
Thanks a ton for responding.
Well I figured that out myself, but still I'll give it to you......