ADO???????????????鷽??
???????????? ???????[ 2014/9/28 10:35:35 ] ????????????? ADO
???????3????γ?“???????”?????????5??
string connectionStr = "Data source=.;Initial Catalog=Student; Integrated Security=True";
SqlConnection connection = new SqlConnection(connectionStr);
string sqlStr = "update Course set Ccredit=5 where Cname='???????'";
SqlCommand command1= new SqlCommand(sqlStr?? connection);
connection .Open();
if (command1.ExecuteNonQuery() > 0)
{
MessageBox.Show("??????????");
};
connection .Close();
??????2????????????ExecuteScalar??????????????????(Object)????????????е???е????
???????4????Student???в??????201244111???????????
string connectionStr = "Data source=.;Initial Catalog=Student;
Integrated Security=True";
SqlConnection connection = new SqlConnection(connectionStr);
string sqlstr = "select Sname from student where Sno='201244111' ";
SqlCommand command1 = new SqlCommand(sqlstr?? connection);
connection.Open();
string studentName = command1.ExecuteScalar().ToString();
MessageBox.Show(studentName);
connection.Close();
???????DataReader???????????????ж??????ζ????
???????5??????DataReader???ж???student???е?????????
string connectionStr = "Data source=.;Initial Catalog=Student;
Integrated Security=True"; SqlConnection connection = new SqlConnection(connectionStr);
string sqlstr = "select *from student";
SqlCommand command1 = new SqlCommand(sqlstr?? connection);
connection.Open();
SqlDataReader dataReader1 = command1.ExecuteReader();
// DataReader????й????????????????????????????Command?????command1??ExecuteReader()????
while (dataReader1.Read()) ///DataReader??Read()?????????????????????θ????DataReader??????????????????????β??????False???????True
{
MessageBox.Show(dataReader1[0].ToString());
}
connection.Close();
????4.???SqlDataAdapter???????????????????? ?????????????????????????????????е?????????????е???????????С?????????????????????????????????????佻??????
????????????????
????connection1.Open(); ///???????????
????string sqlStr = "SELECT * FROM A"; ///??A????????????????SQL???
????SqlDataAdapter dataAdapter1 = new dataAdapter(sqlStr?? connection1); ///???????dataAdapter1???????????????? ????????????connection1???SELECT???
????DataSet dataSet1 = new DataSet(); ///???????dataSet1??????????? dataAdapter1.Fill(dataSet1);
????………………………………
????///???SqlDataAdapter???е?Fill()???????????????????У????SqlDataAdapter???е?Fill()??????Update()???????????????????????????????????
????connection1.Close();
???????6????Student???е???????????????
string connectionStr = "Data source=.;Initial Catalog=Student;
Integrated Security=True";
SqlConnection connection = new SqlConnection(connectionStr);
string sqlstr = "select *from student";
connection.Open();
SqlDataAdapter dataAdapter1 = new SqlDataAdapter(sqlstr?? connection);
DataSet dataSet1 = new DataSet();
dataAdapter1.Fill(dataSet1); ///???SqlDataAdapter???е?Fill()???????????????????У?????????????????
DataTable dt1 = dataSet1.Tables[0];
///???????????????
this.dataGridView1.DataSource = dt1;
connection.Close();
???????????????????????漰???????????????????SPASVOС??(021-61079698-8054)?????????????????????????
??????
?????????????????????????Щ????????????????????TC???????????????Щ???????????????????????????????????????????????(java .net ?????)???mysql???????????????????ж????д???Python???????????????(DB2)??????BufferPool????????????????????????????????6??????????????????滮???????????????-????????SQL Server???????????????????λ?????PHP??SQL????????????????????Pythonд???NoSQL????????? SQL ?е????????????? SQL ?е?????????Java???????:?????MySQL???????
???·???
??????????????????
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????????
?????????App Bug???????????????????????Jmeter?????????QC??????APP????????????????app?????е????????jenkins+testng+ant+webdriver??????????????JMeter????HTTP???????Selenium 2.0 WebDriver ??????