在使用下面的代碼時,我收到「語法錯誤」。 當你輸入這個特定蛋白質的所有值時(這是一個項目聯合生物學和編程)'serialPro'是一個包含數字但保存爲字符串的文本框 'Reset_Click'重置所有文本框 的代碼:!語法錯誤,而來自不同表格的比較值
if ((serialPro.Text == String.Empty) || (codon1.Text == String.Empty))
{
MessageBox.Show("You didn't fill all the fields","Attention"
MessageBoxButtons.OK,
MessageBoxIcon.Exclamation,
MessageBoxDefaultButton.Button1);
Reset_Click(sender, e);
}
else
{
string connectionString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Projects_2012\\Project_Noam\\Access\\myProject.accdb";
OleDbConnection myConnection = new OleDbConnection(connectionString);
myConnection.Open();
string mySQL = " SELECT COUNT(tblOrderAA.orderAASerialPro) AS orderAASerialPro1 FROM tblOrderAA" +
"WHERE tblOrderAA.orderAASerialPro=" + Convert.ToInt32(serialPro.Text) +
" SELECT (tblProInfo.proInfoSerialNum) FROM tblProInfo WHERE tblProInfo.proInfoSerialNum=" +
Convert.ToInt32(serialPro.Text);
OleDbCommand datacommand = new OleDbCommand(mySQL, myConnection);
OleDbDataReader dataReader = datacommand.ExecuteReader();
dataReader.Read();
if (dataReader.GetInt32(0) == dataReader.GetInt32(1))
{
MessageBox.Show("You have entered all the amino acids for this protein", "Attention",
MessageBoxButtons.OK,
MessageBoxIcon.Exclamation,
MessageBoxDefaultButton.Button1);
Reset_Click(sender, e);
}
TNX的幫助
所以,我怎麼可以把2所陳述中一個字符串?每個人的作品,如果它的唯一陳述。 – user1017315
任何幫助?!我需要它儘快 – user1017315