Hi All, Moin Ocke,

first of all I like to thank you all for your efforts in helping and
supporting my attempts to write a driver and especially Ocke for
answering the questions concerning his code in-depth. It's great to see
the community here is that active and fast responding :-) Sorry, that I
was not that fast, but I promise to do better next time.

To Ocke:

> First of all you have to know which kind of driver you want. I just
look at the code and it looks promising to use either the ODBC or JDBC
in the 
independent way as well.

In fact while experimenting with your code I just focused on the JDBC
part of the code. I will keep this, as you say it is reasonable. 

> The XUnoTunnel is used to get the implementation of an interface. In 
this case it is used to set the correct URL which should be returned 
when you ask the XDatabaseMetaData::getURL()
So when not doing so, the metadata will return for example the 
jdbc:ingres:xxx and not sdbc:ingres as you may want.

Guess clicking the 'Test Connection' button does among others check the
URL returned on a XDatabaseMetaData::getURL() call against the URL
provided by the user, but I didn't found the code that does this test
until now. Of cause such a test would fail in my current implementation.

> When removing the code for OMetaConnection don't forget that you have
to 
store the XConnection objects inside the map of connections otherwise
you 
won't get a catalog for it.

I store instantiated XConnection objects in a member variable
m_xConnections of the type std::vector<
::com::sun::star::uno::WeakReferenceHelper > calling
m_xConnections.push_back(WeakReferenceHelper(xConnection)); before
returning from the drivers connect() method at the moment. When the
drivers dispose() method is called I iterate over m_xConnections and
call dispose on connections that are referenced. Did I forget something
here?

> The work around for the URL problem would be to write a own connection

which would forward all calls to the JDBC/ODBC connection except the 
getMetaData() call and to write this one as well. Doing the same 
forwarding thing and just when asking for getURL() return the correct 
one.

Sounds like plan :-) I will try this and keep you informed if this
helps. 

> When you create a new database file in OOo for mysql and you choose 
mysql jdbc you'll can on the next page select the driver name. So it is 
possible to define different names. By the way I never tried to insert a

different one ;-) Do you try to insert a ingres one?

Yes, I tried that. If I insert the Ingres driver class clicking the
'Test Loading Driver' button the message box says the test was
successful, but when I try to establish a connection a message box says
that the driver class "com.mysql.jdbc.Driver" could not be loaded. I'm
not quite sure if this is a bug in the MySQL driver or not. It seems
like the setting is ignored in the code and the Property Value for
"JavaDriverClass" is hard coded to be "com.mysql.jdbc.Driver".

Best regards,

Michael

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

Reply via email to