谁能帮我看看那这些代码什么意思?public static SqlConnection createdb(){string dbstring = ConfigurationSettings.AppSettings["cn"];SqlConnection conn = new SqlConnection(dbstring);return conn;}public static bool delly(int id){try{SqlConne

来源:学生作业帮助网 编辑:作业帮 时间:2024/11/16 14:35:30
谁能帮我看看那这些代码什么意思?public static SqlConnection createdb(){string dbstring = ConfigurationSettings.AppSettings[
xToPWƇ CͶ'LJ{at]l&{Ky_Y~,:_M{=~;hQe6) o3|qd[ݚ;4i}/{b~)YN(@@0<b t%%Èи1 &BԭiN® I9y7F!@"Iz)UrHb`0F`)ZpWM$n_QC~V!mo5r3w0epY^!+yN4Tg2YbktZp Y1UY3O,:&G Fai^'⊳%|29m'śsyC%8Ǥï44xO:Cgع– 7MUQjs.eK7w٧֯&o3^Rh c}GnjM x4E#k׵I m>yݟ5wTv9p|c%VVm>H$T7*~uutWN#~ y^

谁能帮我看看那这些代码什么意思?public static SqlConnection createdb(){string dbstring = ConfigurationSettings.AppSettings["cn"];SqlConnection conn = new SqlConnection(dbstring);return conn;}public static bool delly(int id){try{SqlConne
谁能帮我看看那这些代码什么意思?
public static SqlConnection createdb()
{
string dbstring = ConfigurationSettings.AppSettings["cn"];
SqlConnection conn = new SqlConnection(dbstring);
return conn;
}
public static bool delly(int id)
{
try
{
SqlConnection conn = createdb();
conn.Open();
SqlCommand cmd = new SqlCommand("delete from book where id=" + id,conn);
cmd.ExecuteNonQuery();
conn.Close();
return true;
}
catch
{
return false;
}
}
}
public StrRegExp()
\x05{
\x05\x05//
\x05\x05// TODO:在此处添加构造函数逻辑
\x05\x05//
\x05}
public static bool IsID(string PostStr)
{
string RegStr = @"^[0-9]*[1-9][0-9]*$";
if (Regex.IsMatch(PostStr,RegStr))
{
return true;
}
else
{
return false;
}

谁能帮我看看那这些代码什么意思?public static SqlConnection createdb(){string dbstring = ConfigurationSettings.AppSettings["cn"];SqlConnection conn = new SqlConnection(dbstring);return conn;}public static bool delly(int id){try{SqlConne
创建连接数据库;
打开数据库;
删除book表中id等于指定的所有记录
最后关闭数据库.