服务器环境:
- Windows 2008 64bit
- SQL Anywhere 16服务器
SQLA数据库服务器自带的例子数据库位置:C:\Users\Public\Documents\SQL Anywhere 16\Samples\demo.db"
用Sybase Central创建服务:
服务名称:DemoDBService
参数:-n DemoDB -x tcpip "C:\Users\Public\Documents\SQL Anywhere 16\Samples\demo.db"
生成的Server name: DemoDB
Database name: demo
缺省监听端口2638
客户端环境:
- JDK 1.6/1.7
- eclipse Juno
装载 jConnect 驱动程序:这个驱动需要找SAP/Sybase单独下载。该驱动貌似可以访问多种SAP/Sybase数据库!
jconn4.jar
在Java/eclipse数据库访问数据库:
Driver Class: com.sybase.jdbc4.jdbc.SybDriverJDBC URL: jdbc:sybase:Tds:localhost:2638/ demo?USER=dba&PASSWORD=sql
参考:
参考:装载 SQL Anywhere JDBC 4.0 驱动程序 http://dcx.sybase.com/1200/zh/dbprogramming/pg-jdbc-4-0-load.html
参考:http://blog.chinaunix.net/uid-16765068-id-4093220.html
参考:例子Java/JDBC代码
http://dcx.sybase.com/1200/zh/dbprogramming/connecting-establishing-jdbc.html
http://www.quickprogrammingtips.com/java/connecting-to-sybase-sql-anywhere-database-in-java.html
Sybase jConnect 6.05 (available at http://www.sybase.com/products/allproductsa-z/softwaredeveloperkit/jconnect)
jConnect for JDBC 7.0 > jConnect for JDBC 7.0 Programmers Reference > Programming Information > Setting up jConnect
http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.infocenter.dc39001.0700/html/prjdbc0700/prjdbc07008.htm