using System;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using Oracle.DataAccess.Client;
namespace chekpassword
{
public partial class loginForm : Form
{
public int isOk;
public string UserName;
public string DatabaseName;
public loginForm()
{
InitializeComponent();
}
using System.Data;
namespace chekpassword
public partial class loginForm : Form
public int isOk;
public string UserName;
public loginForm()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
UserName = this.textBox1.Text;
DatabaseName = this.comboBox1.Text;
OracleConnection conn = new OracleConnection();
conn.ConnectionString = "Data Source=" + DatabaseName +
";Persist Security Info=true;User ID=" +
{
UserName = this.textBox1.Text;
DatabaseName = this.comboBox1.Text;
OracleConnection conn = new OracleConnection();
conn.ConnectionString = "Data Source=" + DatabaseName +
";Persist Security Info=true;User ID=" +
this. UserName +
";Password=" + textBox2.Text + ";";
try
{
conn.Open();
isOk = 1;
this.Close();
}
catch (Oracle.DataAccess.Client.OracleException err)
{
MessageBox.Show(err.Message);
isOk = 0;
conn.Close();
}
}
try
{
conn.Open();
isOk = 1;
this.Close();
}
catch (Oracle.DataAccess.Client.OracleException err)
{
MessageBox.Show(err.Message);
isOk = 0;
conn.Close();
}
}
}
}