QED数据库使用笔记之Developing With QED
来源:互联网 发布:java ftp下载文件代码 编辑:程序博客网 时间:2024/05/21 10:35
Connecting to a database
In order to access a database, you need to obtain a JDBC
Connection
object. There are two basic ways to get a database connection:Using the JDBC
DriverManager
interface, you can directly obtain a JDBCConnection
, if you know:
- The name of the JDBC Driver class (
com.quadcap.jdbc.JdbcDriver
)- The database URL (
jdbc:qed:database-name
)- Any connection parameters (see below)
For QED, you could obtain a database connection using code similar to the following:
//获得驱动,建立连接
Class.forName("com.quadcap.jdbc.JdbcDriver");java.sql.Connection conn = java.sql.DriverManager.getConnection("jdbc:qed:mydb");//mydb是要连接的数据库名称or, to create a new database:
//创建一个新的数据库
Class.forName("com.quadcap.jdbc.JdbcDriver");java.util.Properties p = new java.util.Properties();p.setProperty("create", "true");java.sql.Connection conn = java.sql.DriverManager.getConnection("jdbc:qed:mynewdb", p);another way to create a new database:
//另外一种创建数据库的方法
Class.forName("com.quadcap.jdbc.JdbcDriver");java.sql.Connection conn = java.sql.DriverManager.getConnection("jdbc:qed:mynewdb;create=true");
- QED数据库使用笔记之Developing With QED
- QED数据库使用笔记之Connection properties
- QED数据库使用笔记之备份数据
- QED数据库使用笔记1
- latex中使用proof证明时如何去掉QED(结尾的方括号)
- Developing iOS 8 Apps with Swift 学习笔记
- Developing Excel Utilities with VBA
- Developing Linux Kernel with Netbeans
- 学习stanford公开课 Developing iOS8 Apps with Swift 笔记(一)
- 使用Prism开发Windows 8 Metro应用(Developing Windows 8 Metro Applications with Embarcadero Prism)
- Developing Web Applications with JavaServer Faces
- Developing SIP Applications with SIP Servlet
- Developing Applications with Visual Studio.NET
- Developing Applications with Java and UML
- Wireless Java: Developing with J2ME, Second Edition
- Developing Multi-Agent Systems with JADE
- Android Developing In Eclipse, with ADT
- Android Developing In Eclipse, with ADT
- NekoHTM
- QED数据库使用笔记1
- .NET未释放事件Handler可能导致内存泄漏
- 近期看到的几篇关于AJAX的文章收藏
- [GearMaster开发]呕血的建模&&新的地图方案
- QED数据库使用笔记之Developing With QED
- Unix操作系统的历史演变
- 16进制文件(HEX)转2进制文件(BIN)小结
- 瑞星病毒及木马预警一周播报(2008.01.21-01.27)
- PHP与正则表达式 2 :一些修饰符与preg_match_all
- 也谈SUN收购MySQL
- 首次使用CSDN博客&决定参加微软IC挑战一下
- JSF点滴积累--通用文件下载函数
- 用google做开源的主机