🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

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

#20946
From: apollo
Date: Fri, 12 Dec 2003 15:56
26 lines
1716 bytes
���ˣ�������

�ҰѴ������һ��
Class.forName(jdbcDriver).newInstance(); //load driver
Connection  dbConn = DriverManager.getConnection(dbURL); //connect
String sql = "insert into infor(ID,PASS) values(200004,'456')";
Statement stmt = dbConn.createStatement();
int rs = stmt.executeUpdate(sql);
System.out.println(rs);
dbConn.commit();

����rsӦ�÷��ص����¼����row no.�ģ�����ÿ�ζ���1

�� �� songgr (��ȸβ) �Ĵ������ᵽ: ��
: ��᲻���autoCommit���false�ˣ��ֹ�����ݿ���commitһ�����ԡ�
: �� �� apollow (apollo) �Ĵ������ᵽ: ��
: : jdbcDriver = "sun.jdbc.odbc.JdbcOdbcDriver"
: : ����ǰ�滹������һ��select�����


--
/configure
make
make install

�� ��Դ:��Ʈ��ˮ�Ƽ� Freecity.dhs.org��[FROM: apollow]
Technical Details
Message-ID: <49cLeL$9iR@Freecity.dhs.org>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-01!sn-xit-09!supernews.com!38.144.126.76.MISMATCH!feed2.newsreader.com!newsreader.com!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 07:57:59 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-01!sn-xit-09!supernews.com!38.144.126.76.MISMATCH!feed2.newsreader.com!newsreader.com!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: 12 Dec 2003 15:56:57 GMT
Organization: Ʈ��ˮ�Ƽ�
Message-ID: <49cLeL$9iR@Freecity.dhs.org>
Mime-Version: 1.0
Content-Type: text/plain; charset="gb2312"
Content-Transfer-Encoding: 8bit
X-Filename: Java/M.1071244437.A