Output Parameter Missing on SQLDataAdapter

  • Thread starter Thread starter Bruce Hodge
  • Start date Start date
B

Bruce Hodge

Hi All,

I have wrapped the SQLDataAdapter in an object and with some stored
procedurs I get the Output Parameters, with others I don't, strange. I have
validated with Query Analyzer that the Output Parameter is returning a value
any thoughts on how to chase this down further much appreciated.

Snippets of source below.

this.objCmd = new SqlCommand();
this.objCmd.Connection = this.objConn;

// Now setup the Stored Procedure

this.objCmd.CommandText = this.SP_Name;
this.objCmd.CommandType = CommandType.StoredProcedure
this.LoadParameters();

try

{

this.objDA = new SqlDataAdapter(this.objCmd);
this.objDS = new DataSet();
this.objDA.Fill(this.objDS);
return objDS;

} ...

The output Parameters are loaded before execution and retrieved after the
Fill!

Bruce H
 
What does "LoadParameters()" look like? Are you defining a parameter with
"Direction = ParameterDirection.Output" for each output parameter?
 
Back
Top