yuva2achieve / solidbase

Automatically exported from code.google.com/p/solidbase
Apache License 2.0
0 stars 0 forks source link

DBVERSION existence detection currently only works for Oracle, MySQL, Derby and HSQLDB #75

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
To test if the DBVERSION table exists a SELECT is executed and the resulting 
error is 
ignored if the SQLState is one of:

42000 (Oracle)
42S02 (MySQL)
42X05 (Derby)
S0002 (HSQLDB)

There are problems with this:

- Unlikely but what if an error from one database vendor is equal to one of the 
above?
- What to do with databases from other vendors?

Questions:

- How can we make this generic?
- How can we detect the database vendor?
- If we don't succeed, then we have to make this configurable and document it.

Original issue reported on code.google.com by rene.de....@gmail.com on 15 May 2010 at 8:36

GoogleCodeExporter commented 9 years ago
We could also just check for 42xxx and S0xxx. See also 
org.springframework.jdbc.support.SQLStateSQLExceptionTranslator.

With this, we exclude other problems like connection problems and the like.

Original comment by rene.de....@gmail.com on 15 May 2010 at 8:45

GoogleCodeExporter commented 9 years ago
Used 42xxx and S0xxx.

Original comment by rene.de....@gmail.com on 21 May 2010 at 9:10