🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

�����PreparedStatement��java��ʵ����ݿ��

#23666
From: �չ�΢��
Date: Sun, 20 Jul 2003 14:23
13 lines
1528 bytes
��ʵ��
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����ֻ��ָ��ȷ����ֵ�����ʵ����ԭ�л��ϼ�һ����

--
�� ��Դ:������δ��վ bbs.pku.edu.cn��[FROM: 61.149.60.45]
Technical Details
Message-ID: <47L5kl$ACL@bbs.pku.edu.cn>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed.media.kyoto-u.ac.jp!maily.cic.tsinghua.edu.cn!news.happynet.org!PKU

Show Full Headers
Complete Article Headers
X-Google-Language: Chinese,GB
X-Google-Thread: f6cb0,6703d2ed2fb54b7c,start
X-Google-Attributes: gidf6cb0,public
X-Google-ArrivalTime: 2003-07-20 07:24:14 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed.media.kyoto-u.ac.jp!maily.cic.tsinghua.edu.cn!news.happynet.org!PKU
From: samba@bbs.pku.edu.cn (�չ�΢��)
Newsgroups: cn.bbs.comp.lang.java
Subject: �����PreparedStatement��java��ʵ����ݿ��
Date: 20 Jul 2003 14:23:45 GMT
Organization: ����δ��վ
Message-ID: <47L5kl$ACL@bbs.pku.edu.cn>
Mime-Version: 1.0
Content-Type: text/plain; charset="gb2312"
Content-Transfer-Encoding: 8bit
X-Filename: Java/M.1058710991.A
Lines: 13