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) {
相关问答:
我的数据库是简体sqlserver2000 ,我想在繁体access下连接,通过odbc是可以了,但在access下出现打开的表全中"#已删除"
不知道要怎么操作才可以用ACCESS繁体连接简体sqlserver2000.谢谢!!!
大家都 ......
如题
只有100分给了。。。
哪个行业?
我想网上的源码肯定不能完全满足个人想法
最后还得自己整
推荐一款自助建站软件:风讯
C#+SQL
可以设计出比较灵活的网站
什么行业啊....
到51aspx.co ......
小弟现在Swing在连接数据库上遇到一点问题,请问Swing里面的事件和SQLserver数据库的连接有什么好的资料书推荐吗?
这个应当没有什么特别,与其他的编程一样.
JDBC
请问在Swing中加载背景图片是怎么加的?
......
conn.execute "delete from PSTC_About where id in ("&SelectID&")"
其中SelectID是传递过来的记录ID,实际形成的语句如 conn.execute "delete from PSTC_About where id in ( ......
现在遇到的问题:
读取本地已有的dbf数据库,写入到SQLSERVER2000中,但是看书和网上全是项目自带数据库的读写(即绑定数据源)。
已知道dbf的路径,但是连接的字符串和数据读取的操作怎么写?
如何连接SQLS ......