给央视挑错

7.1看央视的焦点访谈,是一位新疆的医生,是个军人。

里面有一句“他每天要做二三十台手术”,这个好像有点问题吧?

阅读更多

SQL 挑错

10-07

共有三个问题,没有递进关系,请指教rnrn1.///////////////////////////////////////////////////////////////////////////////////////////////////rn [code=C#]rn//以下的 SQL语句 用得正确吗? 可以用"@dataTable" 这样的参数吗?rn public bool delEmailAccount(int nodeId, string dataTable, string userName)rn rn OleDbParameter[] parameters = rn new OleDbParameter("@dataTable",dataTable),rn new OleDbParameter("@nodeId", nodeId),rn // new OleDbParameter("@userName", userName),rn ;rnrn return DBhelper.ExecuteNonqueryBool("delete from @dataTable where id=@nodeId", parameters);rn rnrn[/code]rnrnrn2.///////////////////////////////////////////////////////////////////////////////////////////////////rn[code=C#]rn //为什么以下的语句操作不了数据库的数据?rn public bool delEmailAccount(int nodeId, string dataTable, string userName)rn rn OleDbParameter[] parameters = rn //这里为什么就不能用下面的参数方式来执行操作呢?rn //new OleDbParameter("@dataTable",dataTable),rn new OleDbParameter("@nodeId", nodeId),rn // new OleDbParameter("@userName", userName),rn ;rnrn return DBhelper.ExecuteNonqueryBool("delete from " + dataTable + " where id=@nodeId", parameters);rn rnrnrn //而以下的语句却可以呢?rn public bool delEmailAccount(int nodeId, string dataTable, string userName)rn rn OleDbParameter[] parameters = rn //new OleDbParameter("@dataTable",dataTable),rn // new OleDbParameter("@nodeId", nodeId),rn // new OleDbParameter("@userName", userName),rn ;rnrn return DBhelper.ExecuteNonqueryBool("delete from " + dataTable + " where id=" + nodeId, parameters);rn rn[/code]rnrnrn3.///////////////////////////////////////////////////////////////////////////////////////////////////rn为什么以下语句老添加不进数据库呢,返回的都是False.语句上有错误吗?rn[code=C#]rn //添加搜索结果到数据库rn public bool addToDataBase(emailSearchSys_model model)rn rn OleDbParameter[] parameters = rn new OleDbParameter("@CustomerEmail", model.CustomerEmail),rn new OleDbParameter("@CustomerPhone", model.CustomerPhone),rn new OleDbParameter("@CustomerNote", model.CustomerNote),rn new OleDbParameter("@categoryId", model.CategoryId),rn new OleDbParameter("@categoryName", model.CategoryName),rn new OleDbParameter("@userName", model.UserName),rn ;rnrn return DBhelper.ExecuteNonqueryBool("insert into CustomerData (email,phone,cmsNote,categoryId,categoryName,userName)"rn+"values (@CustomerEmail,@CustomerPhone,@CustomerNote,@categoryId,@categoryName,@userName)", parameters);rn rn[/code]rnrn

没有更多推荐了,返回首页