ADO.NET经典连接用法,1.SqlCommand构造函数①初始化SqlCommand类的新实例。publicSqlCommand();SqlCommandmyCommand=newSqlCommand();②初始化具有查询文本的SqlCommand类的新实例。publicSqlCommand(string);StringmySelectQuery="SELECT*FROMmindata";SqlCommandmyCommand=newSqlCommand(mySelectQuery);