Output Parameter Missing on SQLDataAdapter

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
 
M

Michael Lang

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top