主题:[讨论]请高手赐教,我不是很明白这个问题????
string str;
str = ComboBox.Text;
if(str == "机票预定服务")
label1.Text = str;
难道ComboBox.Text内容到底是什么类型的
为什么我上边的语句不可以显示出来那
还有我定义了一个: string no;
并且给no 赋了值: no = "1";
为什么在SQL语句中就不可以这样写呢???:
string myConnectString = "Persist Security Info=False;Integrated Security=SSPI;database=zhwPaper;server=CLC-31071999FBB\\CLC;Connect Timeout=30";
SqlConnection myConn = new SqlConnection(myConnectString);
myConn.Open();
SqlDataAdapter myAdp = new SqlDataAdapter("select serve_name, serve_expense, execute_time, reliability, availability, store_address from serve_detail where serve_detail.No = (select No from serve where serve.serve_name = 'no');" ,myConn);
DataSet dst=new DataSet();
myAdp.Fill(dst, "serve_detail");
dataGrid1.DataSource = dst.DefaultViewManager;
myConn.Close();
str = ComboBox.Text;
if(str == "机票预定服务")
label1.Text = str;
难道ComboBox.Text内容到底是什么类型的
为什么我上边的语句不可以显示出来那
还有我定义了一个: string no;
并且给no 赋了值: no = "1";
为什么在SQL语句中就不可以这样写呢???:
string myConnectString = "Persist Security Info=False;Integrated Security=SSPI;database=zhwPaper;server=CLC-31071999FBB\\CLC;Connect Timeout=30";
SqlConnection myConn = new SqlConnection(myConnectString);
myConn.Open();
SqlDataAdapter myAdp = new SqlDataAdapter("select serve_name, serve_expense, execute_time, reliability, availability, store_address from serve_detail where serve_detail.No = (select No from serve where serve.serve_name = 'no');" ,myConn);
DataSet dst=new DataSet();
myAdp.Fill(dst, "serve_detail");
dataGrid1.DataSource = dst.DefaultViewManager;
myConn.Close();