Current location - Education and Training Encyclopedia - Graduation thesis - How to set the page number of the footer of a paper
How to set the page number of the footer of a paper
The purpose of this paper is to improve the scientific and cultural level of the whole nation and master modern scientific and technological knowledge and scientific management methods. How to set the page number of the footer of the paper? Below I will share with you some methods of how to set page numbers in the footer of a paper. Come and enjoy with me.

How to set the page number of the footer of a paper

1. Select Insert in the menu bar, enter the footer option, and click Edit Footer in the pop-up window.

Second, design options will appear in the menu bar. Click the page number and select the bottom of the page in the pop-up window. At this time, various styles will appear at the bottom. Generally choose the middle page number, that is, choose the ordinary number 2.

Third, click the common number 2 option.

4. Graduation thesis sometimes needs to use other page numbers instead of ordinary Arabic numerals. At this time, we need to click the format page number option in the page number option.

5. In the Page Number Format window, select the page number format, start the page number, and then click OK.

6. Finally, the numbers appear in the footer.

A model essay on java

Java database (JDBC)

This paper mainly introduces how to connect SQL Server2000 database through JDBC and ODBC interfaces, and how to access the database through Java applications. At the same time, the simple query function is realized through the graphical user interface.

Keywords: Java JDBC ODBC accessing SQL

order

Java language is one of the excellent languages for programming database applications, which provides a convenient technology for accessing data. Using JDBC technology in Java language, users can easily develop database access programs based on web pages, thus expanding network application functions. JDBC(Java Database Connectivity) is a Java API for executing SQL statements, which can provide a unified access interface for various relational databases. JDBC consists of a set of classes and interfaces written in Java language. By calling the methods provided by these classes and interfaces, users can connect to many different database systems (such as Access, SQL Server 2000, Oracle, Sybase and so on). ) in a consistent way, and then they can access the data in the database using the standard SQL language without writing different Java program codes for each database system.

Java application connects with database through JDBC API(java.sql), but the actual action is that JDBC driver manager connects with database system through JDBC driver. ODBC (Open Database Connection) is an open interface, which provides users with a standard interface for accessing relational databases and a unified set of APIs for different databases. Applications can access any database that provides ODBC driver through API. At present, all relational databases provide ODBC driver, so ODBC has become the industry standard for database access and has been widely used.

JDBC(Java DataBase Connectivity) is a middleware, which realizes the interface function between Java application and database management system. As mentioned above, JDBC improves the abstraction of database programming so that programmers only need to explain what to do. Database connection? No explanation? How to connect? , to perform? Data manipulation? No explanation? How to operate? . This abstraction is based on SQL, and applications can be embedded in SQL to access and operate the database. This enables the application to be independent of a specific relational database management system.

The architecture of 1 JDBC

Simply put, JDBC provides a set of programming interfaces for applications, which are defined in the java.sql package of Java API and the javax.sql package extended after JDK 1.2. JDBC communicates with a database management system by installing different drivers (usually related to a specific database management system). The driver is responsible for interpreting the SQL statements embedded by the application using JDBC programming interface, accessing the database in a specific database management system, and then getting the corresponding results. The application uses JDBC programming interface to access the database with the returned results. This architecture is a common way in the Java world, and the architecture of JDBC is shown in figure 1.

ODBC (Open Database Connection) is also a widely used middleware for connecting applications and databases. However, unlike JDBC, ODBC provides a C language programming interface, and many database management system vendors have written corresponding database drivers for ODBC in Java. JDBC-ODBC bridge driver is often used in Java applications, and it is a driver attached to JDBC API. It connects to the database through ODBC and database driver, and is responsible for converting the C language programming interface provided by ODBC into the Java language programming interface.

The JDBC-ODBC bridge is a JDBC driver, which is realized by converting JDBC operations into ODBC operations. Using JDBC-ODBC bridge can make program developers write JDBC applications without learning more knowledge, and make full use of existing ODBC data sources. The JDBC-ODBC bridge driver enables JDBC to access almost all types of databases.

2. Three things. JDBC(Java accesses the database through JDBC and ODBC interfaces) can be completed.

(i) Connect to the database

(ii) Send SQL statements to the database.

(iii) Processing the results returned by the database.

Let's illustrate these three steps with an example.

Suppose we have a database designed with access: student. Mdb, there is a table in this table, and its name is Cheng Jibiao (student number, name, mathematics, physics, English).

(1) database connection

Set data source:

Open the control panel in Windows, double-click the odbc data source icon to open the user data source dialog box, click the Add button to add a new data source, and select the microsoft access driver (*. Mdb), and then click the Finish button. Give the data source a favorite name (such as redsun) in the data source name box, then click the Select button, set the data source redsun as the database student.mdb to be connected, and click the OK button.

Establishing JDBC-ODBC bridge:

Class.forName(? sun.jdbc.odbc.JdbcOdbcDriver? );

Among them, Class is a class in the java.sql package, and this class can build a JDBC-ODBC bridge by calling its static method forName. The standard method is:

Try {Class.forName (? sun.jdbc.odbc.JdbcOdbcDriver? );

}

Catch (ClassNotFoundExceptione)

{}

Connect to database:

Declare an object using the Connection class in the java.sql package, and then use the class DriverManager to call its static method getConnection to create this connection object. The standard method is:

Try to {connect

con = driver manager . get connection(? jdbc:odbc:redsun? ,? Snow? ,? lss? );

}

Catch(SQLException e) {}

Snow and lss are login names and passwords respectively.

(2) sending SQL statements to the database

First, declare an SQL statement object with statement, and then call the createstatment () method through the newly created database connection object con to create this SQL statement object.

try { Statement SQL = con . create Statement(); }

catch(SQLException e) { }

(3) processing the results returned by the database

With the SQL object, you can call the corresponding methods to query and modify the database, and store the query results in the object declared by the ResultSet class, that is to say, the query operation of the SQL statement on the database will return a ResultSet object:

ResultSet rs=sql.executeQuery(? Select * from the transcript? );

The following is an example about database query.

Import java.sql. *;

Public aaa level

{public static void main (string parameter)

{String name, Xue Hao; Date date; Int mathematics, physics, English;

Connect the sql result set RS of con statement;

Try {Class.forName (? sun.jdbc.odbc.JdbcOdbcDriver? ); }

catch(ClassNotFoundException e){ }

attempt

{

con = driver manager . get connection(? jdbc:odbc:redsun? ,? Snow? ,? lss? );

SQL = con . create statement();

rs=sql.executeQuery(? SELECT * FROM Cheng Jibiao, where student number = '4'? );

while(rs.next())

{ name = RS . getstring(2); xuehao = RS . getstring( 1);

math=rs.getInt(? Math? );

Physical =rs.getInt (? Physics? ); english=rs.getInt(? English? );

System.out.println(? Name:? +name);

System.out.println(? Student number:? +Xuehao);

System.out.println(? Math:? +mathematics);

System.out.println(? Physics:? +physics);

System.out.println(? English:+English);

}

con . close();

}

catch(SQLException e 1) {}

}

}

Concluding remarks

This paper only involves simple query operation of accessing SQL Server2000 database, and it can also be inserted, deleted and modified. With the development of database technology and the continuous upgrading of Java, it will be easier to access the database using Java, and the application scope will be wider and wider. There are many new functions and applications waiting for us to study and develop.

Did you get a look at him? How to set the page number of the paper footer? People still see:

1. How to set the page number in the footer of graduation thesis?

2. How to set the footer page number of graduation thesis?

3. How to set the footer page number of graduation thesis?

4. How to set the footer page number of graduation thesis?

5. How to set the page number in the footer of 5.Word paper?