Server|sqlserver JDBC-ODBC configuration or configuring SQL Server with DataSource although it is convenient to look at the link, it is difficult to handle the result set to truly achieve the JDBC2 standard, so you want to be a little "professional" or
SQL Server's JDBC itself to connect.
Class.forName ("Com.microsoft.jdbc.sqlserver.SQLServerDriver");
Connection conn= drivermanager.getconnection (Url,user,password);
However, if the URL is written, because ODBC is simply configured with the data source (refers to the DataSource in the MS System configuration), DataSource (refers to the DataSource of Jdni technology registration in the Jsp/java IDE)
As long as you write the relevant attributes, the system will find the relevant links for you, and there are few examples of how a complete URL for SQL Server can be written. It's really simple.
String url= "Jdbc:microsoft:sqlserver://hostname:port;databasename=pubs";
Generally speaking, port is 1433. In fact, the URL is written in what format, is completely JDBC implementation of the developer's interest, they do not follow the uniform standard to write, we have to use his JDBC can only be based on their interest to write.
Here are some other databases that are not commonly used JDBC, to illustrate that only the general JDBC is done, some of the same database JDBC by different developers to implement, they may not write, but most of the case:
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.