Hi all,
I have an oracle 9i database and from it I fill a dataset using an OracleDataAdapter. I am pulling information from credit card numbers from multiple tables, encrypting them and the I want to write the values back to the various tables. I am having a problem with my update.
The code to read from the database is:
// Connect to Database
OracleConnection oCon = new OracleConnection
("Data source = DATABASE; user id = Username; password = pass");
oCon.Open();
// Command Object
OracleCommand oCmd = new OracleCommand
("PKG_MultiResultset.Read_Write",oCon);
// Stored Procedure
oCmd.CommandType = CommandType.StoredProcedure;
// Create Parameter Object
oCmd.Parameters.Add(new OracleParameter
("Cardcur",OracleType.Cursor)).Direction = ParameterDirection.Output;
oCmd.Parameters.Add(new OracleParameter
("TransactionCur",OracleType.Cursor)).Direction = ParameterDirection.Output;
// Instatiate Dataset
DataSet Ds = new DataSet();
// Instatiate Data Adapter
OracleDataAdapter oAdp = new OracleDataAdapter(oCmd);
OracleCommandBuilder custCB = new OracleCommandBuilder(oAdp);
// Fill Dataset
oAdp.Fill(Ds);
I now modify the data and I have verified that this is correct. The problem is I don't know how to update multiple tables. Thank you
I have an oracle 9i database and from it I fill a dataset using an OracleDataAdapter. I am pulling information from credit card numbers from multiple tables, encrypting them and the I want to write the values back to the various tables. I am having a problem with my update.
The code to read from the database is:
// Connect to Database
OracleConnection oCon = new OracleConnection
("Data source = DATABASE; user id = Username; password = pass");
oCon.Open();
// Command Object
OracleCommand oCmd = new OracleCommand
("PKG_MultiResultset.Read_Write",oCon);
// Stored Procedure
oCmd.CommandType = CommandType.StoredProcedure;
// Create Parameter Object
oCmd.Parameters.Add(new OracleParameter
("Cardcur",OracleType.Cursor)).Direction = ParameterDirection.Output;
oCmd.Parameters.Add(new OracleParameter
("TransactionCur",OracleType.Cursor)).Direction = ParameterDirection.Output;
// Instatiate Dataset
DataSet Ds = new DataSet();
// Instatiate Data Adapter
OracleDataAdapter oAdp = new OracleDataAdapter(oCmd);
OracleCommandBuilder custCB = new OracleCommandBuilder(oAdp);
// Fill Dataset
oAdp.Fill(Ds);
I now modify the data and I have verified that this is correct. The problem is I don't know how to update multiple tables. Thank you