ResultSetType Settings in Openoffice Base

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

ResultSetType Settings in Openoffice Base

Asli Oezal

Hello,

I am currently developing a DB project and I have implemented a database
with IBM DB2 and connected it with jcc driver to Openoffice base. I had
problems with "join queries of several tables". I searched in the source
code of oo and in the internet, and I realized that the error arises from
ResultSet settings, which are set to TYPE_SCROLL_SENSITIVE, default by
openoffice. In order to display the results for a join query, resultSetType
should be   TYPE_SCROLL_INSENSITIVE.

I have found a log at :
http://www.mail-archive.com/dba-cvs@.../msg00858.html
From what I understand, it is possible to update content.xml file, <
db:data-source> part to set the result set type. Is it correct?
If so, which xml element can be set to update resultsettype of the
statement?

I would be glad if you could help me. Thank you for all your help in
advance.

Regards,
Asli



---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: ResultSetType Settings in Openoffice Base

Frank Schönheit
Hello Asli,

> I am currently developing a DB project and I have implemented a database
> with IBM DB2 and connected it with jcc driver to Openoffice base. I had
> problems with "join queries of several tables". I searched in the source
> code of oo and in the internet, and I realized that the error arises from
> ResultSet settings, which are set to TYPE_SCROLL_SENSITIVE, default by
> openoffice. In order to display the results for a join query, resultSetType
> should be   TYPE_SCROLL_INSENSITIVE.

Hmm, I answered this a few days ago over there in users@dba, but even
the web archive at
http://dba.openoffice.org/servlets/BrowseList?listName=users&by=date&from=2010-09-01&to=2010-09-30&first=1&count=8
is missing it, so perhaps it got lost ...

Here's my original answer:

You should not tamper with the content.xml, instead, set the value
programmatically.

For this, execute the following macro in the context of your .odb file:
  Dim settings as Object
  settings = ThisDatabaseDocument.DataSource.Settings
  settings.RespectDriverResultSetType = TRUE
  ThisDatabaseDocument.store

This tells Base to be less optimistic with its result set settings. That
is, normally Base assumes that it can use the most aggressive result set
type/concurrency, and that a database driver will silently downgrade
this to what it supports.

However, some drivers (and at least IBM's Universe drivers fall into
this category) do no silent downgrade, but instead produce an error. In
those cases, "RespectDriverResultSetType" tells Base to ask the driver
for the supported types.

However, also note that there are known drivers where this setting
doesn't work, simply because the driver itself lies about its supported
types. Again, some versions of IBM's Universe JDBC drivers fall into
this category.

So, you simply need to try out whether this setting really helps you.

Ciao
Frank

--
ORACLE
Frank Schönheit | Software Engineer | [hidden email]
Oracle Office Productivity: http://www.oracle.com/office

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]