Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations dencom on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Contents DataSet

Status
Not open for further replies.

ace333

Programmer
Jul 12, 2005
105
CH
I am just wondering that if you run call a stored procedure from c# that adds a row of data to a table, is there any way check the contents of the dataset after the stored procedure has run successfully.
This is the code:
public DataSet getData(string[] aParams)
{

string sConn = GetConnString();

OracleConnection oracleConn = new OracleConnection(sConn);
OracleCommand objCmd;

DataSet dsRet = new DataSet();

try
{
PopulateCommand(aParams,out objCmd); //Add the parameters to the stored procedure.

objCmd.Connection=oracleConn;

OracleDataAdapter objDA = new OracleDataAdapter(objCmd);

objDA.Fill(dsRet);



///DataTable dataTable = dsRet.Tables[0];
///DataGrid1.DataSource = dataTable;
///DataGrid1.DataBind();


}
 
Hi,

What do you want to check?

Is this any good:

Code:
if (dsRet.Tables[0].Rows.Count > 0){
  //  all is well
} else {
  //  nothing loaded - take action
}

"Just beacuse you're paranoid, don't mean they're not after you
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top