Hi,
I did not use reversedb2 so I cannot say what is happening to it. But when i
inspect the reversedb code, I find that it is a driver related issue. No
matter which driver you use (M$ or other thrid party, it is the same)
In reversedb code there are lines like:
java.sql.ResultSet rs = dbMeta.getPrimaryKeys("%", "%", this.strTableName);
The driver simply do not under standard "%" means wildcards.
If you are able to use profiler you capture lines like:
%..sp_pkeys 'COLUMNS', '%', '%'
which obviously will fail.
So a very simple patch you can change "%" to null or hardcode the database
name (i.e. catalog in jdbc-speak)
Regards,
Anthony
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 08, 2003 7:59 PM
To: [EMAIL PROTECTED]
Subject: RE: MSSQL and reverse-db tool
Hello Alexander,
I have the same problem.
Florian Bruckner (the developer of this tool) told me few weeks ago:
"reversedb was developed and tested with Informix IDS 9, Oracle 8.1.7 and
DB2. Because those databases behave so differently I had to use some tricks
which I thought were clever, but are a cause of major problems with other
databases (MySql, MSSQL, etc.). Therefore I decided to try a second attempt
with a different approach with portability in mind, the result is
reverse-db2, but it simply isn't finished yet. I currently do not have the
time to drive development of reverse-db2 and there are more important goals
to achieve for OJB than writing a reverse-engineering tool, so other
commiters are busy with other tasks."
Regards
Sylvain
-----Message d'origine-----
De: Alexander Enns [mailto:[EMAIL PROTECTED]]
Date: mercredi, 8. janvier 2003 11:54
�: [EMAIL PROTECTED]
Objet: MSSQL and reverse-db tool
Hi folks,
an exception will be thrown when I'm trying to reverse my database.
My configuration:
Database: MSSQL 2000
JDBC Driver: INET Sprinta2000
OJB: 0.9.8
Exception:
[reversedb] java.sql.SQLException: [AEN1]The database name component of the
obje
ct qualifier must be the name of the current database.
[reversedb] at com.inet.tds.e.a(Unknown Source)
[reversedb] at com.inet.tds.a.if(Unknown Source)
[reversedb] at com.inet.tds.a.do(Unknown Source)
[reversedb] at com.inet.tds.g.a(Unknown Source)
[reversedb] at com.inet.tds.g.getTables(Unknown Source)
[reversedb] at
org.apache.ojb.tools.mapping.reversedb.DBMeta.read(Unknown So
urce)
[reversedb] at
org.apache.ojb.tools.mapping.reversedb.gui.JFrmMainFrame.anal
yzeSchema(Unknown Source)
[reversedb] at
org.apache.ojb.tools.mapping.reversedb.gui.JFrmMainFrame.jBut
ton2ActionPerformed(Unknown Source)
[reversedb] at
org.apache.ojb.tools.mapping.reversedb.gui.JFrmMainFrame.acce
ss$100(Unknown Source)
[reversedb] at
org.apache.ojb.tools.mapping.reversedb.gui.JFrmMainFrame$2.ac
tionPerformed(Unknown Source)
[reversedb] at
javax.swing.AbstractButton.fireActionPerformed(AbstractButton
.java:1450)
[reversedb] at
javax.swing.AbstractButton$ForwardActionEvents.actionPerforme
d(AbstractButton.java:1504)
[reversedb] at
javax.swing.DefaultButtonModel.fireActionPerformed(DefaultBut
tonModel.java:378)
[reversedb] at
javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.
java:250)
[reversedb] at
javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Basi
cButtonListener.java:216)
[reversedb] at java.awt.Component.processMouseEvent(Component.java:3715)
[reversedb] at java.awt.Component.processEvent(Component.java:3544)
[reversedb] at java.awt.Container.processEvent(Container.java:1164)
[reversedb] at java.awt.Component.dispatchEventImpl(Component.java:2593)
[reversedb] at java.awt.Container.dispatchEventImpl(Container.java:1213)
[reversedb] at java.awt.Component.dispatchEvent(Component.java:2497)
[reversedb] at
java.awt.LightweightDispatcher.retargetMouseEvent(Container.j
ava:2451)
[reversedb] at
java.awt.LightweightDispatcher.processMouseEvent(Container.ja
va:2216)
[reversedb] at
java.awt.LightweightDispatcher.dispatchEvent(Container.java:2
125)
[reversedb] at java.awt.Container.dispatchEventImpl(Container.java:1200)
[reversedb] at java.awt.Window.dispatchEventImpl(Window.java:914)
[reversedb] at java.awt.Component.dispatchEvent(Component.java:2497)
[reversedb] at java.awt.EventQueue.dispatchEvent(EventQueue.java:339)
[reversedb] at
java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDi
spatchThread.java:131)
[reversedb] at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDisp
atchThread.java:98)
[reversedb] at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.j
ava:93)
[reversedb] at
java.awt.EventDispatchThread.run(EventDispatchThread.java:85)
This exception will be thrown in
org.apache.ojb.tools.mapping.reversedb.DBMeta
by getting tables from meta object.
java.sql.ResultSet rs = dbMeta.getTables("%", "%", "%", null);
I could reproduce this exception in my code. If I set the
first parameter to null or catalogname in the function no exception will be
thrown.
It would be hepful to have possibility to set such parameter (catalog,
schema) from outside too.
Had somebody such a problem by another databases?
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>