This is a very simple example for students, because I have no mobile devices at hand and I will not use any simulators at that time .., therefore, the debugging is successful at the current level. The database uses SQL Anywhere, and it feels good. Because I have never studied it before, I think it is convenient. I will explain how to use SQL Anywhere in detail next time, but I also studied it in Chinese documents. If this guy wants to be lazy and doesn't want to find him, I will add my sans_reason@hotmail.com and I will send it to you. Haha
/*
* If you deploy jul9.dll and jul9_zh.jar on the WindowsCE device, copy them.
* The device should install Djeode.
* Create test. lnk
* 18 # "memory card Insignia Solutions JeodeRuntimeevm.exe"
*-Djeode. evm. console. local. keep = TRUE
*-Djeode. evm. console. local. paging = TRUE
*-Djul. library. dir = UltraLitelib
*-Cp UltraLiteutorial; UltraLitelibjul9_zh.jar
* Customer
*/
/**
* @ Author LiYou
*
*
*/
Import ianywhere. native_ultralite .*;
Import java. SQL. SQLException;
Public class Customer {
Static Connection conn;
Public static void main (String args []) {
Try {
Customer cust = new Customer ();
Cust. insert ();
Cust. select ();
Conn. close ();
} Catch (SQLException e ){
E. printStackTrace ();
}
}
Public Customer () throws SQLException {
DatabaseManager dbMgr = new DatabaseManager ();
/*
* By default, the user name and password of the database are dropped by UltraLite... I don't know how to change it. I never did research on this thing.
*/
String parms = "uid = DBA"
+ "; Pwd = SQL"
+ "; File_name = f: j2metutcustomer. udb"
+ "; Schema_file = f: j2metutcustomer. usm"
+ "; Ce_file = UltraLitetutorialtutcustomer. udb"
+ "; Ce_schema = UltraLitetutorialtutcustomer. usm ";
/*
* If you deploy this line on a WindowsCE device, add two
* Ce_file = UltraLitetutorialtutcustomer. udb
* Ce_schema = UltraLitetutorialtutcustomer. usm
*
* The two rows on the desktop should be ineffective! Note yourself!
*/
Try {