Study Notes on j2-based learning platform (2)

Source: Internet
Author: User
Tags how to use sql

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 {

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.