Setting the Data Source Properties

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

J2EE 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

Other Resources

Connecting to SQL Server with the JDBC Driver