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

java 连接access数据库示例

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-07 15:50:02
Original
1314 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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template