Accessing the database using Java applets (reprint)

Source: Internet
Author: User
Tags access database microsoft access database
accessing databases using Java applets
Learn any program language, of course, with the database, Java just born, the support of the database is not very good, after several years of development, its support for the database has been fully reached the ripe situation. Because this is mainly to introduce Java applets applet, therefore, it is not possible to use a large space to introduce the knowledge of the database, how to build and design a database, or please find some books to see their own! Here, I can't.
Here we use the Microsoft Access database as an example to illustrate how to implement a database open and read knowledge.
First step:
Use Microsoft Access to create a database, which is what I use for this example.
The second step: that is, the process of editing.
1 define variables, and the variables are defined as follows:
TextArea thevisits=new TextArea (6,80);
Displaying the contents of a database
TextField thestatus=new TextField ("", 80);
Displays information about opening the database. Equivalent to the status bar of the program
Connection theconnection; How to connect to a database
Statement thestatement; Represents a database command sent to the database for execution
ResultSet Theresult; Read the result of the data, which is the result of the database return
ResultSetMetaData Themetadata;
Contains useful information about returning results after the execution of a database command.
String Thedatasource; Contains the name of the database or data source being accessed, expressed as a URL.
String theuser; User name of the database
String Thepassword; Password for the database
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.