🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: [java��]jdbc����

#20882
From: apollo
Date: Sat, 13 Dec 2003 04:37
25 lines
2046 bytes
���������˼���ˣ�����һ��
����һ�㲻���ף�executeUpdate�ķ���ֵӦ�����¼�����������ڵ��кŰɣ�
���û����ӵĻ�Ӧ���Ƿ���0

�������ҵij�����ÿ�εķ���ֵ����1��˵�����Ϊ��һ���ˡ

��� �� tianmingjie.bbs@bbs.sjtu.edu.cn (sure) �Ĵ������ᵽ: ��
: : Class.forName(jdbcDriver); //�����Ѿ�ʵ���ˣ���Ҫ��newInstance
: : Connection  dbConn = DriverManager.getConnection(dbURL); //connect
: : String sql = "insert into infor(ID,PASS) values(?,?)";
: : PreparedStatement prepare=dbConn.preparedStatement(dbConn,sql);
: : prepare.setLong(1,200004);//200004�Ѿ�����int��Χ
: : prepare.setString(2,"456");
: : int result =prepare.executeUpdate();'
: good luck
: �� �� snoppy.bbs@Freecity.dhs.org (û���dz�) �Ĵ������ᵽ: ��
: >>  .................<����ʡ��>............


--
/configure
make
make install

�� ��Դ:��Ʈ��ˮ�Ƽ� Freecity.dhs.org��[FROM: apollow]
Technical Details
Message-ID: <49cfSX$ASL@Freecity.dhs.org>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!skynet.be!newsgate.cistron.nl!news.cambrium.nl!news.cambrium.nl!news.cambrium.nl!news2.euro.net!newshosting.com!news-xfer1.atl.newshosting.com!167.206.3.103.MISMATCH!news3.optonline.net!maily.cic.tsinghua.edu.cn!news.ccie.net.cn!Freecity

Show Full Headers
Complete Article Headers
X-Google-Language: Chinese,GB
X-Google-Thread: f6cb0,31cf01cc6187e9c5
X-Google-Attributes: gidf6cb0,public
X-Google-ArrivalTime: 2003-12-12 20:37:52 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!skynet.be!newsgate.cistron.nl!news.cambrium.nl!news.cambrium.nl!news.cambrium.nl!news2.euro.net!newshosting.com!news-xfer1.atl.newshosting.com!167.206.3.103.MISMATCH!news3.optonline.net!maily.cic.tsinghua.edu.cn!news.ccie.net.cn!Freecity
From: apollow.bbs@Freecity.dhs.org (apollo)
Newsgroups: cn.bbs.comp.lang.java
Subject: Re: [java��]jdbc����
Date: 13 Dec 2003 04:37:21 GMT
Organization: Ʈ��ˮ�Ƽ�
Message-ID: <49cfSX$ASL@Freecity.dhs.org>
Mime-Version: 1.0
Content-Type: text/plain; charset="gb2312"
Content-Transfer-Encoding: 8bit
X-Filename: Java/M.1071289953.A
Lines: 25