Home > Database > Mysql Tutorial > java 连接access数据库示例

java 连接access数据库示例

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-07 15:50:02
Original
1293 people have browsed it

import java.sql.*;public class CoalTotals {/** * @param args */public static void main(String[] args) {// TODO Auto-generated method stubtry {//加载数据库支持的驱动Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");String url = "jdbc:odbc:Drive

 

 

这里的url连接一定要注意 不要多个空格少个空格的都不行 因为我写的时候就多了个空格 就提示我  文件名错误

 

其他注意下连接数据库的步骤基本就没什么大问题了~~

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Issues
Install JAVA
From 1970-01-01 08:00:00
0
0
0
Unable to install java
From 1970-01-01 08:00:00
0
0
0
Can java be used as the backend of the web?
From 1970-01-01 08:00:00
0
0
0
Is this in Java language?
From 1970-01-01 08:00:00
0
0
0
Help: JAVA encrypted data PHP decryption
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template