110,536
社区成员
发帖
与我相关
我的任务
分享
string str = "server=(local);integrated security=SSPI;database=HotelDB";
SqlConnection conn = new SqlConnection(str);
conn.Open();
string sql = "SELECT C_BirDate,C_Id,C_Tel From CustomerTable Where C_Name='" + this.textBox1.Text + "'";
SqlCommand cmd = new SqlCommand(sql, conn);
cmd.ExecuteNonQuery();
SqlDataAdapter da = new SqlDataAdapter(sql, conn);
DataSet ds = new DataSet();
da.Fill(ds, "CustomerTable");
DataTable dt = ds.Tables["CustomerTable"];
this.textBox3.Text = //这里就不知道这里怎么写了。。。