string name = this.TxtId.Text.ToString();
string pass = this.TxtPassWord.Text.ToString();
SqlConnection con = new SqlConnection("Server=.;uid =Sa;pwd ='';...
用Dataset就可以,下面是例程: SqlConnection conn = new SqlConnection(connectionString); SqlDataAdapter a = new SqlDataAdapter("select myName, myId from mytable;",conn); DataSet s = ...