mybatis逆向工程不成功,但是也不报错。解决办法

版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://blog.csdn.net/weixin_38313970/article/details/84816327

mybatis逆向工程不成功,但是也不报错。控制台显示如下语句:

2018-12-05 08:51:34,310 [main] DEBUG [org.mybatis.generator.internal.db.DatabaseIntrospector] - Retrieving column information for table " M_CNC_LOG"

后台,经过检查发现。

是我在generatorConfig.xml里面的

<table schema="" tableName=" table"></table>tabled的名字面前加了空格。

 

展开阅读全文

gridview更新不成功 也不报错

10-22

表示成:rn protected void grid_RowUpdating(object sender, GridViewUpdateEventArgs e)rn rn string chexingid = grid.DataKeys[e.RowIndex].Value.ToString();rn string sucheng = ((TextBox)grid.Rows[e.RowIndex].FindControl("suchengTextBox")).Text;rn string description = ((TextBox)grid.Rows[e.RowIndex].FindControl("descriptionTextBox")).Text;rn string imagefilename = ((TextBox)grid.Rows[e.RowIndex].FindControl("tupianTextBox")).Text;rn bool success = CatalogAccess.UpdateCheXing(chexingid, sucheng, description, imagefilename);rn grid.EditIndex=-1;rn statusLabel.Text=success?"更新成功":"更新失败";rn BindGrid();rn rn------------------------------------------rn业务层(CatalogAccess):rn public static bool UpdateCheXing(string chexingid, string sucheng, string description, string imagefilename)rn rn SqlCommand comm = GenericDataAccess.CreateCommand();rn comm.CommandText = "UpdateCheXing";rn SqlParameter param = comm.CreateParameter();rn param.ParameterName = "@CheXingID";rn param.Value = "chexingid";rn param.SqlDbType = SqlDbType.Int;rn comm.Parameters.Add(param);rn param = comm.CreateParameter();rn param.ParameterName = "@SuCheng";rn param.Value = "sucheng";rn param.SqlDbType = SqlDbType.VarChar;rn param.Size = 50;rn comm.Parameters.Add(param);rn param = comm.CreateParameter();rn param.ParameterName = "@Description";rn param.Value="description";rn param.SqlDbType = SqlDbType.VarChar;rn param.Size = 2000;rn comm.Parameters.Add(param);rn param = comm.CreateParameter();rn param.ParameterName = "@ImageFileName";rn param.Value = "imagefilename";rn param.SqlDbType = SqlDbType.VarChar;rn param.Size = 50;rn comm.Parameters.Add(param);rn int result = -1;rn tryrn rn result = GenericDataAccess.ExecuteNonQuery(comm);rn rn catchrn rn //rn rn return (result != -1);rn-----------------------------------------------rn存储过程:rnALTER PROCEDURE UpdateCheXing(rn@CheXingID int,rn @SuCheng varchar(50),rn@Description varchar(2000),rn @ImageFileName varchar(50))rnASrnUpdate CheXingList rnset Description=@Description,SuCheng=@SuCheng,ImageFileName=@ImageFileNamernwhere CheXingID=@CheXingIDrn--------------------------------------------------rn就是点击编辑,更新后 不成功 vs也不报错 不知道问题出在哪里?太晚了睡觉了 大家帮忙看下~~~~~~ 论坛

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