🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: cn.bbs.comp.lang.java
Article #23561

Re: �����PreparedStatement��java��ʵ����ݿ��

#23561
From: ����
Date: Tue, 22 Jul 2003 03:16
24 lines
1740 bytes
conn.prepareStatement( "UPDATE count SET index=index+? WHERE count.no=?" );
..


�� �� samba@bbs.pku.edu.cn (�չ�΢��) �Ĵ������ᵽ: ��
: ��ʵ��
: UPDATE count set index��index��n WHERE count.no��m
: ���ǰ�count���б��Ϊm���е�index�е�ֵ��ԭ�л��ϼ�n��m,n������ж�̬ȷ����
: ʹ��PreparedStatement�������ݿ��е���ݣ�����Ҫд���������
: PreparedStatement pstmt=
: conn.prepareStatement("UPDATE count SET index=�� WHERE count.no=?");
: pstmt.setInt(1,2);
: pstmt.setInt(2,2)
: pstmt.executeUpdate();
: ����pstmt.setInt����ֻ��ָ��ȷ����ֵ�����ʵ����ԭ�л��ϼ�һ����


--
del *.���� /s
unable to delete file


help!!!!!!!!!!!!!!!!!!!!
�� ��Դ:����ˮ˼Դ bbs.sjtu.edu.cn��[FROM: 202.120.8.23]
Technical Details
Message-ID: <47MFSV$AKT@bbs.sjtu.edu.cn>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-01!sn-xit-08!supernews.com!newsfeed.news2me.com!newsfeed.media.kyoto-u.ac.jp!news.neu.edu.cn!SJTU

Show Full Headers
Complete Article Headers
X-Google-Language: Chinese,GB
X-Google-Thread: f6cb0,6703d2ed2fb54b7c
X-Google-Attributes: gidf6cb0,public
X-Google-ArrivalTime: 2003-07-21 20:20:59 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-01!sn-xit-08!supernews.com!newsfeed.news2me.com!newsfeed.media.kyoto-u.ac.jp!news.neu.edu.cn!SJTU
From: ppsm.bbs@bbs.sjtu.edu.cn (����)
Newsgroups: cn.bbs.comp.lang.java
Subject: Re: �����PreparedStatement��java��ʵ����ݿ��
Date: 22 Jul 2003 03:16:09 GMT
Organization: ��ˮ˼Դ
Message-ID: <47MFSV$AKT@bbs.sjtu.edu.cn>
Mime-Version: 1.0
Content-Type: text/plain; charset="gb2312"
Content-Transfer-Encoding: 8bit
X-Filename: Java/M.1058843743.A
Lines: 24