Muokkaa

Jaa


Setting the data source properties

Download JDBC driver

Data sources are the preferred mechanism by which to create JDBC connections in a Java Platform, Enterprise Edition (Java EE) environment. Data sources provide connections, pooled connections, and distributed connections without hard-coding connection properties into Java code. All Microsoft JDBC Driver for SQL Server data sources can set or get the value of any property by using the appropriate setter and getter methods, respectively.

Java EE products, such as application servers and servlet/JSP engines, typically let you configure data sources for database access. Any property listed in the Setting the Connection Properties topic can be specified wherever the configuration lets you enter a property as a property=value pair.

For more information about SQL Server data sources, see the SQLServerDataSource class. For an example of how to use the SQLServerDataSource class to make a connection to a SQL Server database, see Data source sample.

See also

Connecting to SQL Server with the JDBC driver