爱学习受.NET

www.icjyw.com 记录开发技术收藏天地
公告信息
www.icjyw.com 记录开发技术收藏天地
文章分类
文章档案
文章
DHTMLX GRID数据连接实现方法
2011/8/5 12:19:58

所依赖的类

import java.sql.Connection;
import java.util.HashMap;
import java.util.Iterator;

/**
* The Class GridConnector.
*/
public class GridConnector extends BaseConnector {

/** The extra info , which need to be mixed in output */
protected StringBuffer extra_output = new StringBuffer();

/** The collections of options */
protected HashMap<String,BaseConnector> options = new HashMap<String,BaseConnector>();

/**
* Instantiates a new grid connector.
*
*
@param db the db connection
*/
public GridConnector(Connection db){
this(db,DBType.Custom);
}

/**
* Instantiates a new grid connector.
*
*
@param db the db connection
*
@param db_type the db type
*/
public GridConnector(Connection db, DBType db_type){
this(db,db_type, new GridFactory());
}

/**
* Instantiates a new grid connector.
*
*
@param db the db connection
*
@param db_type the db type
*
@param a_factory the class factory, which will be used by object
*/
public GridConnector(Connection db, DBType db_type, BaseFactory a_factory){
super(db,db_type,a_factory);
}

.....................

创建ic交易网本地数据库连接

Connection conn= null;
try {

//获得数据库连接
conn = ConnectionManager.getConnection();

//Dhtmlx连接
GridConnector c = new GridConnector(conn,DBType.MSSQL);

DHTMLX支持当前主流的数据库

 * The Enum DBType.
*
* Stores supported DB types
*/
public enum DBType {

/** The Common SQL. */
SQL,
/** The MySql. */
MySQL,
/** The Oracle. */
Oracle,
/** The MSSQL. */
MSSQL,
/** The PostgreSql. */
PostgreSQL,
/** The Custom DB type ( will be defined by class factory ) */
Custom
}
 
新浪微博粉丝精灵,刷粉丝、刷评论、刷转发、企业商家微博营销必备工具"
 MyQBlog   浏览(3361)   评论(0)   关键字
  
Copyright © 2010-2020 power by CYQ.Blog - 秋色园 v2.0 All Rights Reserved