在用ASP.net2.0+SQLServer2005做个东西,执行下面这个插入时出现错误:
strsql = "insert into Article(ChannelId,Title,SubTitle,AddDate,Content,ViewNum,Author,Source) values ('" + newsclass.SelectedValue + "','" + title.Text + "','" + sectitle.Text + "','" + System.DateTime.Now.ToString() + "','" + FCKeditor1.Value + "','" + "1" + "','" + author.Text + source.Text + "')";错误提示:
INSERT 语句中列的数目大于 VALUES 子句中指定的值的数目。VALUES 子句中值的数目必须与 INSERT 语句中指定的列的数目匹配。 请各位大侠帮助。
strsql = "insert into Article(ChannelId,Title,SubTitle,AddDate,Content,ViewNum,Author,Source) values ('" + newsclass.SelectedValue + "','" + title.Text + "','" + sectitle.Text + "','" + System.DateTime.Now.ToString() + "','" + FCKeditor1.Value + "','" + "1" + "','" + author.Text + source.Text + "')";错误提示:
INSERT 语句中列的数目大于 VALUES 子句中指定的值的数目。VALUES 子句中值的数目必须与 INSERT 语句中指定的列的数目匹配。 请各位大侠帮助。
解决方案 »
- 各位请赐教大虾
- asp.net 中使用OWC11 画的饼图
- asp.net如何将货币型转换为decimal 百分简单问题
- 哪位大哥做过OA系统的能个需求文档及详细设计的文档吗?万分感谢!!!
- datalist中获取值的方法
- 关于微软的《如何使用 Microsoft Mobile Internet Toolkit 进行移动窗体身份验证》求助~!
- 关于在子页面取得模板页的内容
- 当用户发帖子时,为了不让使用HTML标记,用什么函数解决?
- 在asp.net加入梅花雨控件,页面上加CodePage="936"后,回传的中文字符乱码
- asp.net中很少的文本可以用Label绑定,但如果是一段或两段用什么绑定呢?
- asp.net发送邮件问题
- 求吴旗娃分页控件如何传多个参数
strsql = "insert into Article(ChannelId,Title,SubTitle,AddDate,Content,ViewNum,Author,Source) values ( ' " + newsclass.SelectedValue + " ', ' " + title.Text + " ', ' " + sectitle.Text + " ', ' " + System.DateTime.Now.ToString() + " ', ' " + FCKeditor1.Value + " ', '1', ' " + author.Text + " ',' " + source.Text + " ') ";
中间少个“,”号,这样的话前后数量都不对啊
INSERT 语句中列的数目大于 VALUES 子句中指定的值的数目。VALUES 子句中值的数目必须与 INSERT 语句中指定的列的数目匹配。
这个错误信息给的提示是足够的详细了啊 。