Warning 1 'System.Data.OracleClient.OracleConnection' is obsolete: 'OracleConnection has been deprecated.
http://go.microsoft.com/fwlink/?LinkID=144260'
D:\MS Visual Studio Projects\TOU Transference\TOU Transference\TOU Transference\Form1.cs 20 26 TOU Transference
source code Code (C#)
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.OracleClient;
namespace TOU_Transference
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
OracleConnection objConn;
OracleCommand objCmd;
private void Form1_Load(object sender, EventArgs e)
{
String strConnString;
strConnString = "Data Source=XE;Persist Security Info=True;User ID=xxxx;Password=xxxx;Unicode=True;";
objConn = new OracleConnection(strConnString);
objConn.Open();
if (objConn.State == ConnectionState.Open)
{
this.lbText.Text = "Oracle Connected";
}
else
{
this.lbText.Text = "Oracle Connect Failed";
}
}
}
}
Tag : .NET, Oracle, Win (Windows App), C#, Windows