简体   繁体   中英

Can we connect to SQL Server 2005 database from code with out having the installation of client and server

I need to retrieve data from the database. I have the database name, username, password, servername, but I don't have the software installed in my machine. Can I connect to the db and retrieve the data from the db from database from Java code?

您需要在运行应用程序以从其他计算机访问数据库的系统上至少拥有数据库驱动程序,例如ODBC或JDBC驱动程序。

从Java开始,只要安装了某种驱动程序(例如ODBC)就很容易。尝试使用odbc来 Googling 连接到db

Yes. The jdbc driver .jar can be used stand alone. It logs a warning about a missing .dll, but that can be ignored unless you need to use windows auth.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM