How to connect to a Berkeley DB using JDBC?

我的未来我决定 提交于 2019-12-07 19:19:40

问题


I have a Berkeley DB on a local folder and I'd like to connect to it via JDBC. Specifically via Zentus SqliteJDBC.

My problem is with the connection string ("url"). While a sqlite connection string might look like: "jdbc:sqlite:c:\\path\\to\\database.db", Berkeley DB does not have a single .db file to refer to. Instead, I see multiple .jdb files that make up the DB.

My questions is - What should my connection string look like?


回答1:


Berkeley DB is certified against the CH-Werner JDBC driver. The primary differences between the Zentus driver and the Ch-Werner driver is the Zentus driver is a full java implementation while the Ch-Werner is a C implementation with a JNI layer.

You can post your question over on the BDB forums and it is possible that someone might have the specific instructions for connection with the Zentus driver. There is technological reason why this would not work.

The BDB build and installation guide has specific instructions on how to connect with Ch-Werner driver. See http://docs.oracle.com/cd/E17076_02/html/installation/index.html. Section 5 has info on building for Windows and section 7 has info on building for Linux. Look for building/using the JDBC driver.



来源:https://stackoverflow.com/questions/10786800/how-to-connect-to-a-berkeley-db-using-jdbc

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!