Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
aniaahh
Starting Member
2 Posts |
Posted - 2004-06-01 : 23:46:47
|
| hey i was wondering what if i have to call one stored procedure ( with two input arguments ) which looks like this : 'checking procedure' : if @var = ' sth ' exec first_stored_proc else exec second_stored_proc what happens then with getting returned values to the application? i tried this a minute ago - split up a very blurry stored procedure into couple of pieces , each one executed dependently on the above stored proc ( or very similar one ) in application, lets say c#, what do i fill the result table with? results from the 'checking procedure' or from first_stored_proc? either way - does not work for me. hoping for some suggestions. |
|
|
derrickleggett
Pointy Haired Yak DBA
4184 Posts |
Posted - 2004-06-01 : 23:54:51
|
| either way - does not work for me. Then you are in trouble aren't you??? How else would you do it? When you execute a procedure like you are describing above, it will return the resultset for whichever query it ends up calling. Can you clarify what you are looking for a little?MeanOldDBAderrickleggett@hotmail.comWhen life gives you a lemon, fire the DBA. |
 |
|
|
aniaahh
Starting Member
2 Posts |
Posted - 2004-06-02 : 00:06:35
|
| trouble? no my life does not hinge on this procedure....but to the point :when i run the above stored proc in my c# code :SqlCommand Cmd = new SqlCommand("checking_procedure",Conn);SqlDataAdapter tempDA = new SqlDataAdapter(); tempDA.SelectCommand = Cmd; tempDA.Fill(DS,"testuj_szukanie" ); DataTable resultTable = DS.Tables[0]; dataGrid1.DataSource = resultTable;it does not work properly, even though it was when all the dependent procedures were one.that is the clarification |
 |
|
|
vganesh76
Yak Posting Veteran
64 Posts |
Posted - 2004-06-02 : 00:25:54
|
| Can u make it a bit clear, what do u actually want. u want to correct the Stored procedure or the C# codeEnjoy working |
 |
|
|
|
|
|