Monday, March 12, 2012

How To return a value from stored procedure when select nothing

Hi, nice to meet you all. I'm new developer and need help. Normally i use "sqldatasource1.select()", but need to fill argument, what is argument? Actually the main point i wan to return a value from stored procedure or got any methods can do this way? Hope you all can help me... Thank

U can use out parameter to get the value. Plz check out

Thank u

Baba

Please remember to click "Mark as Answer" on this post if it helped you.

|||

Thank you for your reply, but i already try this way, can't work because it need argument... do u have any sample or any good idea to get the parameter? Thank You

|||

Hi chohoo,

sqldatasource.select() method need aDataSourceSelectArguments object as a parameter. In your case you can create a empty instance and pass into select method. like this:

DataSourceSelectArguments args=new DataSourceSelectArguments();

sqldatasource1.select(args);

You can use a dataview object to hold the data returned by select().

BTW, " retrun a value from a stored procedure" is another story. Does that has anything to do with sqldatasource.select?

|||

Thank You for Ur Reply, actually I already used other method (Use dataset read to return). Whatever Thank You Becoz You Help Me.Smile

No comments:

Post a Comment