这个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
相关问答:
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jas ......
我一个项目,有个插入操作,具体是这样的:
我有进货信息表。在出货时选择相应的进货信息,输入数量,选择部门后,点保存按钮,由于网络延时,点一下没有反映,于是用户就又点一下,导致一次插入了两条记录:
例:
......
sql的软件在哪里可以下啊!在网上找了蛮多都用不了啊
随便搞一D版吧,
迅雷第一个就可以用
2000,2005都这样
http://119.147.41.16/down?cid=0698C2D64D7D637D90A6D2482298E6717D4F15CD&t=2&fmt=-1 ......
请问
添加新数据源->数据库->添加连接
这个界面下,数据源选择:Microsoft SQL Server (SqlClient);
服务器名:
应该写什么呢?
有谁知道?多谢各位!!
你到底是要连mysql还是mssql?
引用
请问
......
求个vb中的sql语句的写法,次sql语句的用法是分页程序
我写的如下:其中A是用来接收每页显示的记录的条数,B是用来接收显示的当前的页面.
sqltext="select top A * from log where id not in(select top ( ......