java 用于 Microsoft SQL Server CE(精简版)3.5 的 jdbc 驱动程序
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/141454/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
jdbc driver for Microsoft SQL Server CE(Compact Edition) 3.5
提问by anjanb
I want to be able to explore the contents of a DB for this version of the DB. I was thinking of using the Squirrel DB client (which needs a JDBC driver).
我希望能够为这个版本的 DB 探索 DB 的内容。我正在考虑使用 Squirrel DB 客户端(需要 JDBC 驱动程序)。
Therefore, I'm looking for a JDBC type 4 driver for SQL SERVER 3.5. Can somone point me to a FREE OR open source or trial ware ?
因此,我正在为 SQL SERVER 3.5 寻找 JDBC 类型 4 驱动程序。有人可以给我指出免费或开源或试用软件吗?
If no JDBC driver, how do MS developers explore a given .SDF file ?
如果没有 JDBC 驱动程序,MS 开发人员如何探索给定的 .SDF 文件?
Thank you,
谢谢,
BR,
~A
BR,
~A
采纳答案by djangofan
There is a free program called SQLCeEditor that does it.
有一个名为 SQLCeEditor 的免费程序可以做到这一点。
I'd still like a JDBC driver though since that would make it easy to use with Eclipse and Java.
我仍然喜欢 JDBC 驱动程序,因为它可以很容易地与 Eclipse 和 Java 一起使用。
回答by Bruno Gomes
Have you tried SQL Server Management Studio Express?
您是否尝试过SQL Server Management Studio Express?
You can access SQL Server Compact 3.5 databases stored on a smart device or on the desktop computer by using SQL Server Management Studio in SQL Server or SQL Server Management Studio Express (SSMSE). http://technet.microsoft.com/en-us/library/ms172037.aspx
可以使用 SQL Server 中的 SQL Server Management Studio 或 SQL Server Management Studio Express (SSMSE) 访问存储在智能设备或台式计算机上的 SQL Server Compact 3.5 数据库。http://technet.microsoft.com/en-us/library/ms172037.aspx
As for the JDBC Driver, you could take a look at this one, provided by Microsoft. I don't know if it works with the Compact Edition or if you already tried it, but I thought it was worth mentioning.
至于JDBC Driver,你可以看看微软提供的这个。我不知道它是否适用于 Compact Edition 或者您是否已经尝试过,但我认为值得一提。
回答by MatthewMartin
1- There isn't a JDBC driver and at time of writing, MS has no plans to create one.
1- 没有 JDBC 驱动程序,在撰写本文时,MS 还没有创建一个的计划。
2- There isn't a ODBC driver, so the next obvious answer (JDBC to ODBC bridge) won't help you.
2- 没有 ODBC 驱动程序,所以下一个明显的答案(JDBC 到 ODBC 桥)不会帮助你。
3- Some JDBC vendors claim to be able to connect to 'any oledb' data source, so that is yoru most likely best bet-- link, but it won't necessarily be free.
3- 一些 JDBC 供应商声称能够连接到“任何 oledb”数据源,所以这很可能是最好的选择——链接,但它不一定是免费的。
回答by Chochos
Try jTDS, it's a free software JDBC driver for SQL Server and Sybase.
试试 jTDS,它是用于 SQL Server 和 Sybase 的免费软件 JDBC 驱动程序。
回答by djangofan
JDBC driver uses TCP/IP connection. The compact edition most likely cannot listen on TCP/IP port 1433. Compact Edition is meant to be accessed by an application which has loaded the .dlls necessary to talk to it. It's meant for Visual Studio projects.
JDBC 驱动程序使用 TCP/IP 连接。精简版很可能无法侦听 TCP/IP 端口 1433。精简版旨在由已加载与其对话所需的 .dll 的应用程序访问。它适用于 Visual Studio 项目。
You need to uninstall compact edition and install SQL Express 2005/2008 instead. After installation enable the "sa" account, give it a password, enable SQL+NT authentication, and then enable the TCP/IP listener to listen on port 1433 (the default port).
您需要卸载精简版并安装 SQL Express 2005/2008。安装后启用“sa”账号,给它一个密码,启用SQL+NT认证,然后启用TCP/IP监听器监听1433端口(默认端口)。
Then, finally, you can connect with JDBC. Jtds is a JDBC3.0 driver and therefore requires JDK1.6+ . I prefer using the Microsoft 2005 JDBC2.0 driver.
然后,最后,您可以连接 JDBC。Jtds 是 JDBC3.0 驱动程序,因此需要 JDK1.6+ 。我更喜欢使用 Microsoft 2005 JDBC2.0 驱动程序。
回答by howard
Use SDF Viewerto explore your .SDF database file, can also import/export data, script and work with tables, indexes and foreign keys.
使用SDF 查看器浏览您的 .SDF 数据库文件,还可以导入/导出数据、脚本和使用表、索引和外键。

