简体   繁体   English

如果供应商没有提供驱动程序,我们可以使用jdbc吗?

[英]can we use jdbc if vendor has not provided driver?

This is just a theoretical question for my own knowledge. 这只是我自己知识的理论问题。 Most of the RDBMS databases that we use have vendor provided JDBC driver but if there is a DB for which vendor has not provided any driver, is it still possible to connect to that database using JDBC? 我们使用的大多数RDBMS数据库都有供应商提供的JDBC驱动程序,但是如果有供应商没有提供任何驱动程序的数据库,是否仍然可以使用JDBC连接到该数据库? Does that mean that we will have to write our own driver or is there any other way? 这是否意味着我们必须编写自己的驱动程序或者还有其他方法吗?

As Jan pointed out, there's a JDBC-ODBC Bridge that allows you to write JDBC code provided that there's an ODBC driver for the database, if for some reason there doesn't exist a JDBC driver for the database. 正如Jan所指出的那样,如果由于某种原因不存在数据库的JDBC驱动程序,那么JDBC-ODBC Bridge允许您编写JDBC代码,前提是存在数据库的ODBC驱动程序。 I remember years ago it being very popular to connect to MS Access , but even that's no longer the best way to go. 我记得几年前连接到MS Access非常受欢迎,但即使这样也不再是最好的方式了。

However being in a situation where you don't have a JDBC driver should be very rare, and if you should encounter that kind of situation, maybe it would be a good time to migrate to a more modern database in any case.. 但是,在你没有JDBC驱动程序的情况下应该是非常罕见的,如果你遇到这种情况,也许在任何情况下迁移到更现代的数据库都是一个好时机。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 我们可以在 Java 中使用 JDBC 驱动程序使用 Select 查询来获取顶点数据吗 - Can we use the Select query to get the vertex data using JDBC Driver in Java 如何从同一供应商添加多个oracle jdbc驱动程序? - How to add multiple oracle jdbc driver from same vendor? 我可以在Spring Roo中使用MS Access JDBC驱动程序吗? - Can I use an MS Access JDBC driver in Spring Roo? JDBC驱动程序是否可以配置为使用共享内存协议 - Can the JDBC driver be configured to use a Shared Memory protocol Spring / JPA / Hibernate可以使用简单的JDBC兼容驱动程序吗? - Can Spring/JPA/Hibernate use simple JDBC-compliant driver? 为什么我们在连接数据库时使用 Class.forName(“oracle.jdbc.driver.OracleDriver”)? - Why we use Class.forName(“oracle.jdbc.driver.OracleDriver”) while connecting to a database? 是否可以在Android上使用jdbc驱动程序? - is it possible to use jdbc driver on android? 我们如何在jdbc中使用prepare语句,因为它是一个接口 - how can we use prepare statement in jdbc since it is an interface 我们可以使用纯jdbc连接进行Spring事务管理吗 - Can we use plain jdbc connection for spring transaction management 我们可以使用扫描仪输入在jdbc程序中将值插入数据库吗 - can we use scanner input for inserting values into database in jdbc program
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM