reader =myCommand.ExecuteReader() ;

来源:学生作业帮助网 编辑:作业帮 时间:2024/11/28 07:09:56
reader =myCommand.ExecuteReader() ;
xRAK0+fuQ= D=JlZh.IC)^dÄ o)_0m\}^^^ `Mu1% XP5T2Yq_1w\@Wz?ۯ0Q4FjXLR#p?G/Ocz%l"KQQh9BM`RiiDdT+>PJ MODKR\De들ݶR,$`0/c]^%d{ @UdȀMªRptr }j]$O]%ؗI'NZlt<3(rJG

reader =myCommand.ExecuteReader() ;
reader =myCommand.ExecuteReader() ;

reader =myCommand.ExecuteReader() ;
ExecuteReader()----执行命名,返回一个类型化的 IDataReader
简化代码如下:
using (SqlConnection conn = new SqlConnection(connString))
{
string sqlString = "proc_InsertNewContact";
SqlCommand sqlCmd = new SqlCommand(sqlString,conn);
sqlCmd.CommandType = CommandType.StoredProcedure;
sqlCmd.Parameters.AddWithValue("@AddressLine1",mAddressLine1);
conn.Open();
SqlDataAdapter sqlreader = sqlCmd.ExecuteReader();
conn.Close();
}