易截截图软件、单文件、免安装、纯绿色、仅160KB

这个SQL句子如何改? - MS-SQL Server / 疑难问题



string strSqltime = "insert into tblcurrenttime (currenttime,term,modifytime)Values('" +comboBox1.SelectedItem+ "','" +comboBox2.SelectedItem+ "','" +DateTime.Now+ "')";
  报错呀,',' 附近有语法错误。
  
  strsqltime值为:insert into tblcurrenttime (currenttime,term,modifytime)Values('System.Data.DataRowView','下学期','2010-5-5 0:54:47')

  comboBox1中的项是从数据库绑定上去的值,是2009-2010,类型是nvarchar(9)调试出来是:System.Data.DataRowView。如何办呀,请诸大师们。

term后面的逗号要是英文状态下的半角逗号。

string strSqltime = "insert into tblcurrenttime (currenttime,term,modifytime)Values('" +comboBox1.SelectedItem+ "','" +comboBox2.SelectedItem+ "','" +DateTime.Now+ "')";

这是修改后的,你试试。

string strSqltime = "insert into tblcurrenttime (currenttime,term,modifytime)Values('" +comboBox1.SelectedItem+ "','" +comboBox2.SelectedItem+ "','" +DateTime.Now+ "')";


不行呀。
将截断字符串或二进制数据。
语句已终止。

引用
不行呀。
将截断字符串或二进制数据。
语句已终止。
再运行下面这句:

SQL code:
alter table tblcurrenttime alter column ter


相关问答:

csv文件转换成sql导入到数据库,没有数据为何?

执行的顺序:
1)文件浏览框(选择文件使用)
选择好文件后
点击一个导入按钮的时候 ,把上面上传框里的csv文件以一个ID为文件名,上传到**/**文件夹下
2)读取这个文件夹下的csv的文件,转换成sql
3 ......

求一sql语句 - MS-SQL Server / 疑难问题

现在有两张表:文章主表A(articleId,articleTitle),文章评论表B(commentId,articleId,commentTitle)
现在我想实现这样的功能:列出文章列表,其中每篇文章标题下面列出此文章的前2个文章评论,请问sql语句怎么写啊 ......

求一个SQL语句 - MS-SQL Server / 基础类

字段1,字段2.....字段N,Status,ParentID
1,Name1....test1,1,99
1,Name1....test1,3,99
1,Name2....test2,1,101
1,Name2....test2,3,101
1,Name3....test3,2,101
1,Name1....test1,4,101
想要的结果是:
1,Na ......

SQL语句问题 - MS-SQL Server / 疑难问题

请教高手:
 以下是数据库中的三条记录,英文为字段名称  
  id planname TaskBeginTime Status
329 2010年03 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号