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

Sqlserver中的表更新不了

Sqlserver中的表更新不了,我有一个threads表,
里面有回复数,标题什么的再程序中做,更新
不了数据库,在数据库人为的可以更新。
不知道什么原因,跟表之间的关系有关吗?
大侠们,帮帮忙啊???
感觉程序没错的。

public int modifyThreads(Threads threads) {
int num=0;
String sql="update threads set fid=?,author=?,authorid=?,subject=?,dateline=?,lastPost=?,lastPoster=?,views=?,replies=?,displayOrder=?,highLight=?,digest=?,attachment=?,moderated=? where tid="+threads.getTid();
this.openConn();
try {

pstmt=conn.prepareStatement(sql);
pstmt.setInt(1,threads.getFid());
pstmt.setString(2, threads.getAuthor());
pstmt.setInt(3, threads.getAuthorid());
pstmt.setString(4,threads.getSubject());
System.out.println(threads.getSubject());
pstmt.setString(5,threads.getDateline().toString());
pstmt.setString(6,threads.getLastPost().toString());
pstmt.setString(7,threads.getLastPoster());
pstmt.setInt(8,threads.getViews());
pstmt.setInt(9,threads.getReplies());
pstmt.setByte(10,threads.getDisplayOrder());
pstmt.setByte(11,threads.getHighLight());
pstmt.setByte(12,threads.getDigest());
pstmt.setByte(13,threads.getAttachment());
pstmt.setByte(14,threads.getModerated());
num=pstmt.executeUpdate();
} catch (SQLException e) {


相关问答:

sqlserver 数据合并问题

先由如下sql语句
select  A,B,C from table1
union
select  A,B,C from table2
order by A, C asc
得到结果如下:
  A        B      &nbs ......

关于SQLSERVER底层问题 - MS-SQL Server / 疑难问题

请问一下,外网两台SQLSERVER实例数据传输,有没有采用数据压缩和加密。压缩比是多少,加密是什么加密算法?相关文档哪里可以找到?谢谢


我也想知道!关注此贴!

关注~~

数据库大牛都哪去了啊?
......

mfc程序用ADOX连接SqlServer的问题

我看的是安装Office时自带的Microsoft ActiveX数据对象2.5(ADO)其中的内容—目录如下:
ADO程序员参考
  ->ADOX API参考
    ->ADOX代码范例
      -> ......

jsp中sqlserver2005查询的返回值

在jsp页面中,我想显示数据库表中某些字段的值,在方法中,我应该用什么样的集合类型做为返回值比较好,还有,在页面上如何循环输出我查询的内容..急用!!!!!拜托
用List不行吗?

用list

页面用 <c:forEach& ......

sqlserver全文索引的原理

我看了很多文章,写的太专业,能不能用大白话讲讲,就是怎么构建索引的,查的时候是怎么样的步骤,为什么比like快,是不是只要用contect,就一定会去查,比如
select * from table where contect('sdfsd',sdf) and ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号