研发埠

标题: [Oracle interview]What are the steps in the JDBC connection? [打印本页]

作者: 程旭媛    时间: 2013-8-16 16:39
标题: [Oracle interview]What are the steps in the JDBC connection?

作者: 龚城师    时间: 2013-8-16 16:44
While making aJDBC connection we go through the following steps :Step 1 : Register the database driver by using :Class.forName(\" driver classs for thatspecific database\" );Step 2 : Now create a database connection using:Connection con = DriverManager.getConnection(url,username,password);Step 3: Now Create a query using :Statement stmt =Connection.Statement(\"select * from TABLE NAME\");Step 4 : Exceute the query :stmt.exceuteUpdate();




欢迎光临 研发埠 (http://bbs.yanfabu.com/) Powered by Discuz! X3.2