Have a look at <a href="http://www.oracle.com/technology/pub/articles/price_dbtrans_dotnet.html">this Oracle Document</a> which explain the basics about coding transactions.
There is good example of an insert statement, explained step by step. If what you need to do is an update, just replace the sql command int the example, with the desired update statement.
Summarizing :
-Importing the Namespaces
<pre>Imports System
Imports Oracle.DataAccess.Client</pre>
-create an OracleConnection object
<pre>Dim myOracleConnection As New OracleConnection( "User Id=store;Password=store;Data Source=ORCL")
myOracleConnection.Open()</pre>
-create an OracleTransaction object and start the transaction
<pre>Dim myOracleTransaction As OracleTransaction = myOracleConnection.BeginTransaction()</pre>
-create an OracleCommand object to store a SQL statement.
<pre>Dim myOracleCommand As OracleCommand = myOracleConnection.CreateCommand</pre>
-set the CommandText property of the OracleCommand object
<pre>myOracleCommand.CommandText = "INSERT INTO product_types (" & " product_type_id, name" & ") VALUES (" & " 3, 'Magazine'" & ")"</pre>
-run the sql statement
<pre>myOracleCommand.ExecuteNonQuery()</pre>
-commit the transaction in the database
<pre>myOracleTransaction.Commit()</pre>
-close the OracleConnection
<pre>myOracleConnection.Close()</pre>
Regards,
Last Wiki Answer Submitted: September 30, 2008 11:26 pm by carlosdl63,535 pts.
If you live outside the United States, by submitting your email address you consent to having your personal data transferred to and processed in the United States.