Hi Frank,

> Is there a possibility to add some kind of "compatibility switch" to
> your DB's JDBC driver? That is, your wrapping driver could add some
> parameter (like "report-sequences-as-auto-increment=true" or whatever
> fancy name you can imagine) to the connection URL, and your JDBC
> driver would use this to control the behavior of isAutoIncrement.

I think this would be possible, but unfortunately our JDBC driver guy is
not very happy with introducing this change in the JDBC driver at the
moment.
 
> If this doesn't work, I would vote for introducing a generic mechanism
> in OOo's JDBC bridge (let me call it "bridge" instead of "driver",
> since it effectively bridges from JDBC to SDBC, and to not confuse it
> with a "real" JDBC driver) for manipulating the result set meta data,
> and then employ this mechanism from your wrapping driver.
> 
> As an example, consider the type info returned by the
> DatabaseMetaData.
> The JDBC bridge (and in particular the ODatabaseMetaDataBase class in
> connectivity/source/commontools/TDatabaseMetaDataBase.cxx) supports a
> setting "TypeInfoSettings" (passed in the PropertyValue sequence upon
> connecting), which is used to effectively transform the type
> information as retrieved from the database. So, if we have a
> database/setup which needs to fake the type information, this (to a
> certain extent) can be done by simply creating a proper
> TypeInfoSettings value.
> 
> Something similar could perhaps be done for the result set meta data.
> If we have a setting which captures the "when the default value of a
> column is 'sequence_name.nextval', then return 'true' in
> isAutoIncrement" rule, then your wrapping driver could pass this
> setting to the JDBC driver.
> 
> I suppose the RowFunctionParser in
> connectivity/source/*/RowFunctionParser.* already does almost or all
> of what is needed to create such a rule. Then only the
> ResultSetMetaData implementation of the JDBC bridge needs to accept
> and respect such a setting.

Sounds great, this is a far more neat approach than anything that came
to my mind. I have duplicated all the classes of the JDBC bridge in my
driver now, which works fine, but it is really nasty considering the
code duplication. Before starting anything new I need discuss this with
my project leader, who was on vacation for the last week and should be
back at work tomorrow.

One more thing:

I would like to prevent that OOo Base asks if it should delete a column
and append a new one, when the column definition can't be modified. Is
it possible to do this from within the driver or switch it of in one of
Base's option dialogs (I didn't see anything like this, but maybe I
overlooked it)? There are two problems with this. First is that if the
user has entered data into the column before the data is gone when the
column is deleted and OOo Base shows no respective warning. Second is
that in certain cases Ingres can't append a column to an existing table,
for example if the column is not null and it has no default value. So I
think it would be better to disable this feature when using Ingres.

Best regards,
Micha

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to