🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

java.sql.SQLException ����j2ee�Դ��pointbase���

#20084
From: fireflyjava
Date: Tue, 23 Dec 2003 11:09
69 lines
2562 bytes
 
����j2ee1.4�Դ����pointbase 
 
point.java������� 
import java.sql.*; 
 
public class point { 
public point() { 
} 
 
public static void main(String args[]){ 
 
 
try{  
 
 
Connection con;  
 
Class.forName("com.pointbase.jdbc.jdbcDriver"); 
con=DriverManager.getConnection("jdbc:pointbase:corejava","public","public"); 

//Statement stmt = con.createStatement(ResultSet.TYPE_FORWARD_ONLY ,ResultSet.
CONCUR_UPDATABLE);  
Statement stmt = con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE ,ResultSe
t.CONCUR_UPDATABLE);  
 
ResultSet rs = stmt.executeQuery("SELECT id,name FROM test WHERE ID=1");  
rs.next();  
 
rs.updateString(2,"1231231231ok");  
rs.updateRow();  
rs.close();  
stmt.close();  
con.close();  
}  
catch(Exception e)  
{  
//out.println("An error occurs 1: " + e.toString());  
System.out.println("An error occurs 1: " + e.toString());  
}  
} 
} 
 
 
javac point.java ������� 
����java point 
�������´��� 
java.sql.SQLException:Database corejava dose not exist or cannot be found in d
atabase home \pointbase\databases specified either specify database.hme=<folde
r> int pointbase.ini or use the <URL>; database.home=<folder> to indicate the 
database folder. pointbase.ini should be available int the current folder or y
ou can specify the location for pointbase.ini with java -D:property=value wher
e "property" if pointbse.ini and "value" is <path> pointbase.ini. 
 
 
java -D:property=value ����Ǹ��𡡵ģ� 
 
pointbase.ini���������: 
database.home=D:\Sun\AppServer\pointbase\databases 
database.pagesize=4096 
cache.size=2063 
sort.size=1024 
 
 
 

--

�� ��Դ:���㽭��ѧ���ɰٴ�վ http://bbs.zju.edu.cn [FROM: fireflyjava]
Technical Details
Message-ID: <49kgjL$AeI@bbs.zju.edu.cn>
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!ZJUBBS

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII
X-Google-Thread: f6cb0,524248c51d5b2d33,start
X-Google-Attributes: gidf6cb0,public
X-Google-ArrivalTime: 2003-12-23 03:09:01 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!ZJUBBS
From: fireflyjava.bbs@bbs.zju.edu.cn (fireflyjava)
Newsgroups: cn.bbs.comp.lang.java
Subject: java.sql.SQLException ����j2ee�Դ��pointbase���
Date: 23 Dec 2003 11:09:57 GMT
Organization: �㽭��ѧ���ɰٴ�
Message-ID: <49kgjL$AeI@bbs.zju.edu.cn>
X-Filename: Java/M.1072177797.A