Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Retrieve value from SP from BLL
Message
From
13/10/2007 10:48:24
 
 
To
12/10/2007 11:16:48
Jerry Tovar
Dana Corporation Dana It
Maumee, Ohio, United States
General information
Forum:
ASP.NET
Category:
Databases
Miscellaneous
Thread ID:
01260577
Message ID:
01260820
Views:
6
Jerry,

I'm not sure exactly what you're calling here. What/Where is Adapter.dm_GetNextProcNumber? I've not seen TableAdapters generated with methods like that, so did you add your own methods? Or is this something else? I think I need some more samples to determine what you're doing. Sorry. =0(

OH, BTW ... SqlDataReader can be used instead of SqlDataAdapter when just using a SP that returns a value. I don't have any sample code at the moment (I don't use the DataReader), but you can probably find some (or I'll dig some up) if you want to go that route.

~~Bonnie



>I have a SQL Server store procedure that reads the next number from a field in a table, increments and updates the value by 1 and returns the next number.
>
>I have a Typed Dataset called mydataset that defines a TableAdapter(mytable). I created a new query and choose to use an existing SP and to return Single Value.
>
>From my BLL, I want to create a method that will call the query I created and return the next number value. Below is my BLL method code. This code works, but is this the only way to return a value from a SP? Is there another way?
>
>
>public int p_GetNextProcNumber()
>{
>int? tn_nextproc = 0;
>object myobj = (int?)Adapter.dm_GetNextProcNumber(ref tn_nextproc);
>return (int)tn_nextproc;
>}
>
>
>Thanks,
>
>Jerry
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Previous
Reply
Map
View

Click here to load this message in the networking platform