??C#????Oracle??????????
???????????? ???????[ 2014/1/7 11:26:51 ] ????????C# ????? Oracle
????С???????????C#??????Oracle??????????????????? ?ο???MSDN??????????????????????????????SQL??????????????????
?????????????????
//????????ж??????????????????л??????????????????????????????????????????????????
private void buttonCheck_Click(object sender?? EventArgs e)
{
OracleConnection connection = new OracleConnection();
connection.ConnectionString = "Data Source = ORCL;User ID=xiyoulele;Password=xiyoulele;Unicode=false;" + "Persist Security Info=False";
connection.Open();
OracleCommand myCommand = connection.CreateCommand();
myCommand.CommandText = "select * from users";
OracleDataReader datareader = myCommand.ExecuteReader();
datareader.Read();
OracleString oraclestringFirst = datareader.GetOracleString(0);
string firstStr = oraclestringFirst.ToString();
OracleString oraclestringSecond = datareader.GetOracleString(1);
string secondStr = oraclestringSecond.ToString();
if (firstStr == "admin" && secondStr == "888888")
{
MessageBox.Show("????????");
}
else
{
MessageBox.Show("??????");
}
}
//????????в????μ???
private void buttonRegister_Click(object sender?? EventArgs e)
{
OracleConnection orclConn = new OracleConnection();
orclConn.ConnectionString = "Data Source = ORCL; User ID = xiyoulele; Password = xiyoulele; Unicode = false;" + "Persist Security Info = False";
orclConn.Open();
OracleCommand orclCmd = orclConn.CreateCommand();
orclCmd.CommandText = "insert into users values('xiyoulele'??'55555555')";
orclCmd.ExecuteNonQuery();
orclConn.Close();
MessageBox.Show("???????");
}
???????????δ??????????Demo???е?????????????д??????ó??????????
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11