K
Karl
Hi,
I am having trouble trying to save my updated dataset back
to the source db.
The dataset has 6 tables that I need to cache and work
with and then use stored procedures to insert back into
the db.
below is my command object set up, please tell me if this
is wrong:
public SqlCommand GetInsertCommand(string storedProcName,
SqlConnection conn )
{
SqlCommand aCommand = new
SqlCommand (storedProcName, conn ) ;
aCommand.CommandText =
storedProcName;
aCommand.CommandType =
CommandType.StoredProcedure ;
aCommand.Parameters.Add (new
SqlParameter ("@prm1" , SqlDbType.Decimal, 50, "prm1" ) ) ;
aCommand.Parameters.Add (new
SqlParameter ("@prm2" , SqlDbType.Decimal, 50, "prm2" ) ) ;
aCommand.UpdatedRowSource =
UpdateRowSource.OutputParameters ;
return aCommand ;
}
I am having trouble trying to save my updated dataset back
to the source db.
The dataset has 6 tables that I need to cache and work
with and then use stored procedures to insert back into
the db.
below is my command object set up, please tell me if this
is wrong:
public SqlCommand GetInsertCommand(string storedProcName,
SqlConnection conn )
{
SqlCommand aCommand = new
SqlCommand (storedProcName, conn ) ;
aCommand.CommandText =
storedProcName;
aCommand.CommandType =
CommandType.StoredProcedure ;
aCommand.Parameters.Add (new
SqlParameter ("@prm1" , SqlDbType.Decimal, 50, "prm1" ) ) ;
aCommand.Parameters.Add (new
SqlParameter ("@prm2" , SqlDbType.Decimal, 50, "prm2" ) ) ;
aCommand.UpdatedRowSource =
UpdateRowSource.OutputParameters ;
return aCommand ;
}