R
R Reyes
Hi,
Is there a way to get/set (or override) SqlParameter.SourceColumn values
manually?
Code example:
// create DeleteCommand by SourceColumn
strSQL = "DELETE FROM [MyTable] WHERE (ID=@ID)";
using (sqlData.DeleteCommand = new SqlCommand(strSQL, sqlConn))
{
sqlParam = sqlData.DeleteCommand.Parameters.Add("@ID", SqlDbType.Int);
sqlParam.SourceColumn = "ID";
}
// Get/Set parameter values manually
GetSetParameterValuesManually();
I want to find out the values of @ID in the GetSetParameterValuesManually()
function, row by row, so that I can delete corresponding data in OTHER tables
that use the ID column as the link.
I suppose if there was a way to DELETE from multiple tables using IDs to
link each other it would work, but I don't know if there is a way to do that.
Please help and thanks for your time.
Is there a way to get/set (or override) SqlParameter.SourceColumn values
manually?
Code example:
// create DeleteCommand by SourceColumn
strSQL = "DELETE FROM [MyTable] WHERE (ID=@ID)";
using (sqlData.DeleteCommand = new SqlCommand(strSQL, sqlConn))
{
sqlParam = sqlData.DeleteCommand.Parameters.Add("@ID", SqlDbType.Int);
sqlParam.SourceColumn = "ID";
}
// Get/Set parameter values manually
GetSetParameterValuesManually();
I want to find out the values of @ID in the GetSetParameterValuesManually()
function, row by row, so that I can delete corresponding data in OTHER tables
that use the ID column as the link.
I suppose if there was a way to DELETE from multiple tables using IDs to
link each other it would work, but I don't know if there is a way to do that.
Please help and thanks for your time.