易截截图软件、单文件、免安装、纯绿色、仅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


相关问答:

jsp链接sql2000的疑问?



type Exception report


message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

org.apache.jas ......

数据以xml格式返回 - MS-SQL Server / 应用实例

从数据库中查询一张表的数据
select 部门,姓名 from tb
如何才能生成下面的xml格式
XML code:
<folder state="unchecked" label="全部">
   <folder state="unchecked&qu ......

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

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

求一SQL - MS-SQL Server / 基础类

tab1 字段:billdate,goodsid,incount,inmoney,outcount,outmoney,endprice,endcount,endamt
tab2 字段:goodsid,goodskind(商品类型)
tab3 字段:goodskind(商品类型),kindname
结果:
得到商品类型在一段时间 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号