Link to home
Start Free TrialLog in
Avatar of vandy02
vandy02Flag for United States of America

asked on

Insert into Oracle using parameters with OracleClient

The following code works, but I need to use a parameter for city because I am looping through a list.
            
OracleConnection conn = new OracleConnection(connectionString);
OracleCommand command = conn.CreateCommand();
OracleTransaction transaction;
conn.Open();
transaction = conn.BeginTransaction(IsolationLevel.ReadCommitted);
command.Transaction = transaction;
command.CommandText =
"INSERT INTO address (city) values ('test')";
command.ExecuteNonQuery();
transaction.Commit();
conn.Close();

Thanks!
ASKER CERTIFIED SOLUTION
Avatar of Rytmis
Rytmis

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial