62,205
社区成员
发帖
与我相关
我的任务
分享
public static int ExecuteNonQuery(CommandType ct, string cmdText, SqlParameter[] commandParameters)
{
int retval;
SqlCommand cmd = new SqlCommand();
using (SqlConnection conn = new SqlConnection(connStr))
{
conn.Open();
PrepareCommand(cmd, conn, ct, cmdText, commandParameters);
retval = cmd.ExecuteNonQuery();
cmd.Parameters.Clear();
}
return retval;
}