The Java Database Connectivity (JDBC) API is a series of interfaces that enable Java programmers to access the database, and the interfaces of each developer are not exactly the same. After years of JDBC with Oracle, I've accumulated a lot of skills that enable us to better perform system performance and achieve more functionality.
1, use the thin
Label:JMeter's manual describes how to access MySQL, but does not describe how to access Oracle. For a friend who has no Java application development experience and is not particularly familiar with Oracle, you can refer to this article to easily and quickly configure the JDBC connection and JDBC Request in JMeter.Step
the BLOB type is Empty_blob (). The previously inserted record is then queried with the Select command and locked, and then the empty object is modified to the LOB object to be inserted. 3. Different ways of modification. When modifying other types of fields, use update ... SET ... command. While the LOB Type field, you can only use SELECT ... The FOR UPDATE command queries the record and locks it before it can be modified. And the modification also has two kinds of modification: first, the ori
Using JDBC to connect to the database, you need to load the Oracle JDBC driver and reference a Ojdbc5.jar library. Examples of concatenated strings:Drivermanager.getconnection ("Jdbc:oracle:thin: @localhost: 1521: database ", " login name ", " password ");1 ImportJava.sql.*;2 Public classDbconn {3 PrivateConnectio
, find the ojdbc14.jar\oracle\jdbc\driver below oraceldriver so that you find the driver file to use 2. Operation Database--Join public void AddUser (user user) {
String sql= ' insert into T_user (User_id,user_name,password,contact_tel,email, Create_date) VALUES (?,?,?,?,?,?)"; Connection Conn=null for the participa
Label:Two different ways:Thin is a thin client connection that does not require an Oracle client to be installed, and only requires a JDBC-driven jar package in the classpath. Thin is a purely Java-written Oracle database provider.OCI is a way for a rich client to connect using this connection to install an Oracle clie
Tags: jdbc OracleI remember sophomore time, we went to the Java class, when the teacher said that JDBC this thing, nor how to learn, until now, I do not until the JDBC is what thing, I know this thing can extract data from the database, then what is JDBC?JDBC is the abbrevia
Label:JDBC Connection Database Jndi Connection Pool JDBC Driver package: Used to connect Oracle, it is provided by Oracle itself, directory D:\app\Administrator\product\11.2.0\dbhome_1\jdbc\ Lib under ojdbc6.jar--copy the driver p
(1) Loading and registering the JDBC driver for the database
Load JDBC Driver:
Class.forName ("Oracle.jdbc.driver.OracleDriver");
Register JDBC Driver:
Java.sql.DriverManager.registerDriver (New Oracle.jdbc.driver.OracleDriver
first question: driver name errorThe error is as follows:As you can see from the error message, Oracle writes less A ' a ', which is something that often happens to programmers, and sometimes it can be easily overlooked when it's time to detect errors.It is recommended that you keep the test written correctly, after all, that these are fixed formulations.The second problem:
Database version number: Oracle 10gCharacter set: Simplified Chinese_china. Us7asciiJdk:1.6.0_45Oracle Driver: Ojdbc14.jarUse JDBC to manipulate the database, get connections, run SQL without problems. However, the query out of the results, all Chinese characters, are displayed as garbled.Debug check See in the data from the database to get out of the time, is al
Tags: nls_date_formatRecent projects in addition to a problem, the scenario is probably this, the project was developed abroad, in the project development process using a large number of Oracle function To_date, but the developer did not write a second parameter.So the project in the foreign server can be normal operation, but in the domestic server will not work properly.By investigation, because the first parameter of the To_date function is YYYYMMD
Tags: requires version href 5.0 Select time jdk1.4 compatibility speedRecently, a Java Swing program was written under CentOS and found that the JDBC connection to Oracle in Linux was slow and often failed. But the same program runs very fast under Windows. Online search for a long time and I this situation is not okay, by chance to see the following article:Original Address http://www.xuebuyuan.com/200181.
, and writes all the log files java transaction processing Testdemo : Combined in java.sql the following interfaces PreparedStatement and Oracle Transaction Implementation Bulk DeleteRegular usage:int[] ExecuteBatch ():A batch of commands is submitted to the database to run, assuming that all commands run successfully, an array of update counts is returned.void setString (int Parameterindex, String x):Sets the specified number of parameters to the
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.