2014年5月22日星期四

java connection sqlite3, how to support Chinese path, the path how transcoding ??

everyone who knows Yeah, tangled for several days ! Online search a lot, will not ah !
------ Solution ---------------------------------------- ----
driver package ? I use this sqlitejdbc-v033-nested.jar, brother can say elaborate? Thank you  
you to https://bitbucket.org/xerial/sqlite-jdbc/downloads to download the sqlite jar (sqlite-jdbc-3.7.15-M1.jar). I took the local music library kugoo music onto desktop. I check my download history

Class.forName("org.sqlite.JDBC");
Connection conn=DriverManager.getConnection("jdbc:sqlite:C:/Documents and Settings/Administrator/桌面/KGMusicV2.db");
Statement st=conn.createStatement();
ResultSet rs=st.executeQuery("select * from DownloadItem");
while(rs.next()){
System.out.println(rs.getString(1));
}
rs.close();
st.close();
conn.close();

------ For reference only ----------------------------------- ----
not experiment too , but have to do it can be nothing good , adapt to his own is the best choice.
------ For reference only -------------------------------------- -
do is to give the user the software used , of course, is that many users in China use Chinese path , you also force users to use the software to be in English path ? This will reduce the friendliness of the software, the software is not conducive to the promotion and development of the company , I am afraid I can not agree with you that attitude , we are responsible for their own software, to be responsible for the user. To achieve customer satisfaction , their satisfaction ! Finally, I wish all the best !
------ For reference only -------------------------------------- -
not met , the state top .
------ For reference only -------------------------------------- -
bald
------ For reference only ---------------------------------------
you download the sqlite jdbc the jar package , direct write Chinese path on it.
------ For reference only -------------------------------------- -
driver package ? I use this sqlitejdbc-v033-nested.jar, brother can say elaborate? Thank you
------ For reference only ------------------------------------ ---
driver package ? I use this sqlitejdbc-v033-nested.jar, brother can say elaborate? Thank you          
you to    https://bitbucket.org/xerial/sqlite-jdbc/downloads to download the sqlite jar (sqlite-jdbc-3.7.15-M1.jar). I took the local music library kugoo music onto desktop. I check my download history   
  

Class.forName("org.sqlite.JDBC");
Connection conn=DriverManager.getConnection("jdbc:sqlite:C:/Documents and Settings/Administrator/桌面/KGMusicV2.db");
Statement st=conn.createStatement();
ResultSet rs=st.executeQuery("select * from DownloadItem");
while(rs.next()){
System.out.println(rs.getString(1));
}
rs.close();
st.close();
conn.close();
  Brother You're the savior ah ! toss me this question two days, the Internet has been said transcoding or something, I never suspected driver problem . . . Kindness without saying thank
------ For reference only --------------------------------- ------
Since it is for the customer to use, easy to handle that , directly based on the current running path , without transcoding

没有评论:

发表评论