🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

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

#20970
From: û���dz�
Date: Sat, 13 Dec 2003 02:46
18 lines
1412 bytes
����ЩSample Code�������µİ���


�� �� apollow (apollo) �Ĵ������ᵽ: ��
: Class.forName(jdbcDriver).newInstance(); //load driver
: Connection  dbConn = DriverManager.getConnection(dbURL); //connect
: String sql = "insert into infor(ID,PASS) values(?,?)";
: PreparedStatement prepare=dbConn.prepareCall(sql);
: prepare.clearParameters();
: prepare.setInt(1,200004);
: prepare.setString(2,"456");
: int result =prepare.executeUpdate();
: ʡȥ��catch()
: >>  .................<����ʡ��>............


--
�� ��Դ:��Ʈ��ˮ�Ƽ� Freecity.dhs.org��[FROM: snoppy]
Technical Details
Message-ID: <49ccdP$9mI@Freecity.dhs.org>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newshosting.com!news-xfer1.atl.newshosting.com!feed2.newsreader.com!newsreader.com!maily.cic.tsinghua.edu.cn!news.ccie.net.cn!Freecity

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,GB
X-Google-Thread: f6cb0,31cf01cc6187e9c5
X-Google-Attributes: gidf6cb0,public
X-Google-ArrivalTime: 2003-12-12 18:47:52 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newshosting.com!news-xfer1.atl.newshosting.com!feed2.newsreader.com!newsreader.com!maily.cic.tsinghua.edu.cn!news.ccie.net.cn!Freecity
From: snoppy.bbs@Freecity.dhs.org (û���dz�)
Newsgroups: cn.bbs.comp.lang.java
Subject: Re: [java��]jdbc����
Date: 13 Dec 2003 02:46:17 GMT
Organization: Ʈ��ˮ�Ƽ�
Message-ID: <49ccdP$9mI@Freecity.dhs.org>
Mime-Version: 1.0
Content-Type: text/plain; charset="gb2312"
Content-Transfer-Encoding: 8bit
X-Filename: Java/M.1071283561.A