-->
In this post we are getting more details about OracleConnection Class.We use an object of the OracleConnection class to connect to a Oracle Database.
Although this class is specific to Oracle Database, many of the properties and methods in this class are the same as those for the SqlConnection,OleDbConnection and OdbcConnection classes. If a property or method is specific to OracleConnection, it says so in the Description column of the tables shown in this section.
OracleConnection Properties:
OracleConnection Methods:
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Data.OracleClient; namespace CsApp_Connection { class Program { public static void Main() { string connectionString = "data source=LearnAsp;user id=LearnAsp;" + "password=LearnAsp; Pooling=true; Max pool size=200; Min pool size=0;"; Console.WriteLine("\tADO.NET Connection Object Example""); OracleConnection myConn = new OracleConnection(connectionString); try { // Open connection myConn.Open(); Console.WriteLine("\tConnection opened."); } catch (OracleException ex) { // Display error Console.WriteLine("\tError: " + ex.Message + ex.StackTrace); } finally { // Close connection myConn.Close(); Console.WriteLine("\tConnection closed."); } myConn.Close(); } } }
Thanks for reading ADO.NET OracleConnection
Please do not enter any spam link in the comment box.
No comments:
Post a Comment
Please do not enter any spam link in the comment box.