Kevin,
You'll need to have a parameter and specify it's .Direction as InputOutput (and of course, have your parameter specified as OUTPUT in your Stored Proc). I haven't ever tried it using a .Fill() though, I've only ever done it with an .ExecuteNonQuery() ... so I'm not sure whether it works or not (and I don't have time to try it out tonite).
~~Bonnie
>I have a SQL proc that accepts two params and returns a record and which also has an
>output parameter with an error state.
>
>Using C#, I need to return the record and the output parameter.
>
>So far, I have the following, but I'm not sure I'm going the right direction. Can anyone help?
>
>
>
>
>// Create and open a connection
>SqlConnection oConnection = new SqlConnection(oDBInfo.sConnString);
>oConnection.Open();
>
>// Set up a data adapter
>SqlDataAdapter oDataAdapter = new SqlDataAdapter("sp_MyProc", oConnection);
>oDataAdapter.SelectCommand.CommandType = CommandType.StoredProcedure;
>
>
>// Create a data set
>DataSet oDataSet = new DataSet("MyTable");
>
>// Fill the data set
>oDataAdapter.Fill(oDataSet);
>