SqlCommand 构造函数 (String, SqlConnection),,例:
public void CreateMySqlCommand() 
 {
    string mySelectQuery = "SELECT * FROM Categories ORDER BY CategoryID";
    string myConnectString = "user id=sa;password=;database=northwind;server=mySQLServer";
    SqlConnection myConnection = new SqlConnection(myConnectString);
    SqlCommand myCommand = new SqlCommand(mySelectQuery,myConnection);
    myCommand.CommandTimeout = 15;
    myCommand.CommandType = CommandType.Text;
 }