How to determine database type for a given JDBC connection?

前端 未结 2 345
刺人心
刺人心 2021-02-01 14:58

I need to handle resultsets returning stored procedures/functions for three databases (Oracle, sybase, MS-Server). The procedures/functions are generally the same but the call i

2条回答
  •  孤独总比滥情好
    2021-02-01 15:34

    You can use org.apache.ddlutils, class Platformutils:

    databaseName = new PlatformUtils().determineDatabaseType(dataSource)
    

提交回复
热议问题