-->

The Microsoft JDBC Driver for SQL Server supports the optional JDBC 3.0 APIs to retrieve automatically generated row identifiers. The main value of this feature is to provide a way to make IDENTITY values available to an application that is updating a database table without a requiring a query and a second round-trip to the server.

I'm trying to generate a CSR for an SSL certificate to encrypt connections to my SqlServer 2008 instance located on a Windows Server 2008 server. Most of the documentation I've read mentions using the CSR wizard in IIS. This is a dedicated db server which does not have IIS installed. I am currently using SQL server 2008 R2 Standard edition in a Cluster. During the initial installation I used the product key which was automatically bonded with the setup DVD. Now I have a need to change the product key, keeping the same edition, without reinstalling SQL server.

Microsoft Sql Server Express 2008 R2

Generator

Because SQL Server doesn't support pseudo columns for identifiers, updates that have to use the auto-generated key feature must operate against a table that contains an IDENTITY column. SQL Server allows only a single IDENTITY column per table. The result set that is returned by getGeneratedKeys method of the SQLServerStatement class will have only one column, with the returned column name of GENERATED_KEYS. If generated keys are requested on a table that has no IDENTITY column, the JDBC driver will return a null result set.

As an example, create the following table in the sample database:

Microsoft Sql Server 2008 R2

In the following example, an open connection to the sample database is passed in to the function, an SQL statement is constructed that will add data to the table, and then the statement is run and the IDENTITY column value is displayed.

Sql Server 2008 R2 Developer

See also