spring-framework / org.springframework.jdbc.support / SQLErrorCodeSQLExceptionTranslator / setDataSource

setDataSource

open fun setDataSource(dataSource: DataSource): Unit

Set the DataSource for this translator.

Setting this property will cause a Connection to be obtained from the DataSource to get the metadata.

Parameters

dataSource - DataSource to use to find metadata and establish which error codes are usable

See Also
SQLErrorCodesFactory#getErrorCodes(javax.sql.DataSource)java.sql.DatabaseMetaData#getDatabaseProductName()