5 pts.
 update date value in oracle 9i
What is the code to update a date value in oracle 9i from vb.net

Software/Hardware used:
ASKED: September 4, 2008  11:51 AM
UPDATED: September 30, 2008  11:26 PM

Answer Wiki:
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  carlosdl   63,535 pts.
All Answer Wiki Contributors:  carlosdl   63,535 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _