How to connect to Faircom c-tree database
Faircom c-tree database is a very fast, cross platform and embeddable database. If you use the c-tree non-server (stand-alone files), you can use the JDBC-ODBC bridge driver to connect to the ODBC datasource. If you use the c-tree SQL server, you can directly connect to it using the c-tree JDBC driver. The following describes the steps to set it up.
1. Download JDBC driver
The JDBC driver of Faircom c-tree database comes with its windows SDK. The SDK can be downloaded directly from Faircom website at:
http://www.faircom.com/ctdownload.php
Install the SDK. The default installation will put the JDBC driver file "ctreeJDBC.jar" under the following directory:
c:/FairCom/V8.14/ctreeSDK/ctreeJDBC
2. Define JDBC provider
JDBC providers specify the driver files that can be used to connect to a database. Select the menu “Setting | JDBC Provider…” to display the “Define JDBC Providers” dialog box.
Click the “Add” button to open the “New JDBC Provider” dialog box.
Enter the JDBC provider name, select the database driver type as "Other", and use the “Browse…” button to select the driver files.
Select “*.jar” in the “Files of type” drop-down list. Assuming that you've installed the c-tree windows SDK in C: drive, navigate to directory "C:/FairCom/V8.14/ctreeSDK/ctreeJDBC" to select "ctreeJDBC.jar" file. Click the “Open” button to close the dialog box. The “New JDBC Provider” dialog box will be refreshed as the following.
Click the “OK” button to create the JDBC provider. The “Define JDBC Providers” dialog box will be refreshed with the new provider name.
3. Define database connection information
The database connection information specifies the JDBC settings that used to connect to a database, such as database name, user name and password.
Select the menu “Settings | Database Connection Information…” to display the “Define Database Connection Information” dialog box.
Click “Add” button to open the “New Connection Information” wizard:
Please enter a descriptive name for the database. The name is used to identify the database and its connection information. Then, click “Next” button to go to “Select JDBC provider” page.
Choose the "Ctree JDBC Provider" defined in above steps, then click “Next” button.
Enter "Driver class name" as: ctree.jdbc.ctreeDriver and "Connection URL" as: jdbc:ctree:6597@[server name]:[database name], where [server name] and [database name] should be replaced with the actual c-tree server and database name. The 6597 is the default port the c-tree server listens to. Change it if your c-tree server listens to a different port. Assuming that a c-tree database "ctreeSQL" is installed in the local computer. The connection URL should be: jdbc:ctree:6597@localhost:ctreeSQL. Then, enter the user name and password to the database.
Click “Finish” button to save the definition. The wizard will make a test connection to make sure the information is correct. The “Define Database Connection Information” dialog box will be refreshed as following:
That's all to setup connection information to Faircom ctreeSQL server database. You can start to use the software now.

被折叠的 条评论
为什么被折叠?



