MS Access Parsing Problem

General discussions about code engineering

Moderator: Moderators

MS Access Parsing Problem

Postby jgemmill » Fri Oct 15, 2010 11:14 am

I'm trying to reverse engineer an MS Access 2003 database. I have successfully connected using a DSN to point to the .mdb file with the following parameters:

DB connection URL:
jdbc:odbc:JDBCdsn /* this is our DSN name */
Driver files:
C:\Program Files\sqljdbc_2.0\enu\sqljdbc.jar
C:\Program Files\sqljdbc_2.0\enu\sqljdbc4.jar /* from MS, the only ones I could find */
Driver class:
sun.jdbc.odbc.JdbcOdbcDriver /* JDBC <--> ODBC bridge */

On the Round Trip Set page I can load the Catalog and it displays the name of the .mdb file with fully qualified path, but if I try to load the Schema I get an error (same as below). When I run the reverse, all the tables in the DB show up with their names but none of the columns (or anything else) get parsed and the JDBC driver output is full of errors (see below).

Can anyone help get this to work?

Here is the JDBC driver debug output for one of the errors:

Code: Select all
*Driver.connect (jdbc:odbc:JDBCdsn)
JDBC to ODBC Bridge: Checking security
No SecurityManager present, assuming trusted application/applet
Allocating Connection handle (SQLAllocConnect)
hDbc=1058155816
Connecting (SQLDriverConnect), hDbc=1058155816, szConnStrIn=DSN=JDBCdsn;UID=<username>;PWD=<password>
*Connection.getMetaData
*DatabaseMetaData.getDriverName
Get connection info string (SQLGetInfo), hDbc=1058155816, fInfoType=6, len=300
odbcjt32.dll
*DatabaseMetaData.getDriverVersion
Get connection info string (SQLGetInfo), hDbc=1058155816, fInfoType=7, len=300
04.00.6305
*DatabaseMetaData.getDriverName
Get connection info string (SQLGetInfo), hDbc=1058155816, fInfoType=6, len=300
odbcjt32.dll
Driver name:    JDBC-ODBC Bridge (odbcjt32.dll)
*DatabaseMetaData.getDriverVersion
Get connection info string (SQLGetInfo), hDbc=1058155816, fInfoType=7, len=300
04.00.6305
Driver version: 2.0001 (04.00.6305)
Caching SQL type information
*Connection.getMetaData
*DatabaseMetaData.getTypeInfo
Allocating Statement Handle (SQLAllocStmt), hDbc=1058155816
hStmt=1058153632
Get type info (SQLGetTypeInfo), hStmt=1058153632, fSqlType=0
Number of result columns (SQLNumResultCols), hStmt=1058153632
value=19
Get connection info string (SQLGetInfo), hDbc=1058155816, fInfoType=10, len=300
03.52.0000
Fetching (SQLFetch), hStmt=1058153632
Column attributes (SQLColAttributes), hStmt=1058153632, icol=1, type=2
value (int)=12
Column attributes (SQLColAttributes), hStmt=1058153632, icol=1, type=3
value (int)=128
Get string data (SQLGetData), hStmt=1058153632, column=1, maxLen=129
GUID
Get integer data (SQLGetData), hStmt=1058153632, column=2
value=-11
Get integer data (SQLGetData), hStmt=1058153632, column=3
value=36
Fetching (SQLFetch), hStmt=1058153632
Get string data (SQLGetData), hStmt=1058153632, column=1, maxLen=129
BIT
Get integer data (SQLGetData), hStmt=1058153632, column=2
value=-7
Get integer data (SQLGetData), hStmt=1058153632, column=3
value=1
Fetching (SQLFetch), hStmt=1058153632
Get string data (SQLGetData), hStmt=1058153632, column=1, maxLen=129
BYTE
Get integer data (SQLGetData), hStmt=1058153632, column=2
value=-6
Get integer data (SQLGetData), hStmt=1058153632, column=3
value=3
Fetching (SQLFetch), hStmt=1058153632
Get string data (SQLGetData), hStmt=1058153632, column=1, maxLen=129
LONGBINARY
Get integer data (SQLGetData), hStmt=1058153632, column=2
value=-4
Get integer data (SQLGetData), hStmt=1058153632, column=3
value=1073741823
Fetching (SQLFetch), hStmt=1058153632
Get string data (SQLGetData), hStmt=1058153632, column=1, maxLen=129
VARBINARY
Get integer data (SQLGetData), hStmt=1058153632, column=2
value=-3
Get integer data (SQLGetData), hStmt=1058153632, column=3
value=510
Fetching (SQLFetch), hStmt=1058153632
Get string data (SQLGetData), hStmt=1058153632, column=1, maxLen=129
BINARY
Get integer data (SQLGetData), hStmt=1058153632, column=2
value=-2
Get integer data (SQLGetData), hStmt=1058153632, column=3
value=510
Fetching (SQLFetch), hStmt=1058153632
Get string data (SQLGetData), hStmt=1058153632, column=1, maxLen=129
LONGCHAR
Get integer data (SQLGetData), hStmt=1058153632, column=2
value=-1
Get integer data (SQLGetData), hStmt=1058153632, column=3
value=1073741823
Fetching (SQLFetch), hStmt=1058153632
Get string data (SQLGetData), hStmt=1058153632, column=1, maxLen=129
CHAR
Get integer data (SQLGetData), hStmt=1058153632, column=2
value=1
Get integer data (SQLGetData), hStmt=1058153632, column=3
value=255
Fetching (SQLFetch), hStmt=1058153632
Get string data (SQLGetData), hStmt=1058153632, column=1, maxLen=129
CURRENCY
Get integer data (SQLGetData), hStmt=1058153632, column=2
value=2
Get integer data (SQLGetData), hStmt=1058153632, column=3
value=19
Fetching (SQLFetch), hStmt=1058153632
Get string data (SQLGetData), hStmt=1058153632, column=1, maxLen=129
INTEGER
Get integer data (SQLGetData), hStmt=1058153632, column=2
value=4
Get integer data (SQLGetData), hStmt=1058153632, column=3
value=10
Fetching (SQLFetch), hStmt=1058153632
Get string data (SQLGetData), hStmt=1058153632, column=1, maxLen=129
COUNTER
Get integer data (SQLGetData), hStmt=1058153632, column=2
value=4
Fetching (SQLFetch), hStmt=1058153632
Get string data (SQLGetData), hStmt=1058153632, column=1, maxLen=129
SMALLINT
Get integer data (SQLGetData), hStmt=1058153632, column=2
value=5
Get integer data (SQLGetData), hStmt=1058153632, column=3
value=5
Fetching (SQLFetch), hStmt=1058153632
Get string data (SQLGetData), hStmt=1058153632, column=1, maxLen=129
REAL
Get integer data (SQLGetData), hStmt=1058153632, column=2
value=7
Get integer data (SQLGetData), hStmt=1058153632, column=3
value=7
Fetching (SQLFetch), hStmt=1058153632
Get string data (SQLGetData), hStmt=1058153632, column=1, maxLen=129
DOUBLE
Get integer data (SQLGetData), hStmt=1058153632, column=2
value=8
Get integer data (SQLGetData), hStmt=1058153632, column=3
value=15
Fetching (SQLFetch), hStmt=1058153632
Get string data (SQLGetData), hStmt=1058153632, column=1, maxLen=129
DATETIME
Get integer data (SQLGetData), hStmt=1058153632, column=2
value=11
Get integer data (SQLGetData), hStmt=1058153632, column=3
value=19
Fetching (SQLFetch), hStmt=1058153632
Get string data (SQLGetData), hStmt=1058153632, column=1, maxLen=129
VARCHAR
Get integer data (SQLGetData), hStmt=1058153632, column=2
value=12
Get integer data (SQLGetData), hStmt=1058153632, column=3
value=255
Fetching (SQLFetch), hStmt=1058153632
End of result set (SQL_NO_DATA)
*ResultSet.close
Free statement (SQLFreeStmt), hStmt=1058153632, fOption=1
*ResultSet has been closed
Get connection info (SQLGetInfo), hDbc=1058155816, fInfoType=44
int value=19
Get connection info (SQLGetInfo), hDbc=1058155816, fInfoType=168
int value=1
Get connection info (SQLGetInfo), hDbc=1058155816, fInfoType=151
int value=127
Get connection info (SQLGetInfo), hDbc=1058155816, fInfoType=121
int value=0
Get connection info (SQLGetInfo), hDbc=1058155816, fInfoType=120
int value=0
Get connection info (SQLGetInfo), hDbc=1058155816, fInfoType=153
int value=2
*Connection.getMetaData
*DatabaseMetaData.getSchemas
*DatabaseMetaData.getTables (,%,,null)
Allocating Statement Handle (SQLAllocStmt), hDbc=1058155816
hStmt=1058153632
Tables (SQLTables), hStmt=1058153632,catalog=, schema=%, table=, types=null
RETCODE = -1
ERROR - Generating SQLException...
SQLState(S1C00) vendor code(106)
java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver]Optional feature not implemented
   at sun.jdbc.odbc.JdbcOdbc.createSQLException(Unknown Source)
   at sun.jdbc.odbc.JdbcOdbc.standardError(Unknown Source)
   at sun.jdbc.odbc.JdbcOdbc.SQLTables(Unknown Source)
   at sun.jdbc.odbc.JdbcOdbcDatabaseMetaData.getTables(Unknown Source)
   at sun.jdbc.odbc.JdbcOdbcDatabaseMetaData.getSchemas(Unknown Source)
   at com.nomagic.magicdraw.properties.ui.jideui.JDBCSchemaEditor.browseValue(JDBCSchemaEditor.java:40)
   at com.nomagic.magicdraw.ce.ddl.w$h_$0.browseValue(w$h_$0.java:339)
   at com.nomagic.awt.table.AbstractBrowseTableCellEditor$1.actionPerformed(AbstractBrowseTableCellEditor.java:39)
   at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
   at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
   at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
   at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
   at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
   at java.awt.Component.processMouseEvent(Unknown Source)
   at javax.swing.JComponent.processMouseEvent(Unknown Source)
   at java.awt.Component.processEvent(Unknown Source)
   at java.awt.Container.processEvent(Unknown Source)
   at java.awt.Component.dispatchEventImpl(Unknown Source)
   at java.awt.Container.dispatchEventImpl(Unknown Source)
   at java.awt.Component.dispatchEvent(Unknown Source)
   at javax.swing.plaf.basic.BasicTableUI$Handler.repostEvent(Unknown Source)
   at javax.swing.plaf.basic.BasicTableUI$Handler.mouseReleased(Unknown Source)
   at com.jidesoft.swing.DelegateMouseInputListener.mouseReleased(Unknown Source)
   at com.jidesoft.swing.DelegateMouseInputListener.mouseReleased(Unknown Source)
   at com.jidesoft.grid.TreeTable$DelegateExpandMouseInputListener.mouseReleased(Unknown Source)
   at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)
   at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)
   at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)
   at java.awt.Component.processMouseEvent(Unknown Source)
   at javax.swing.JComponent.processMouseEvent(Unknown Source)
   at java.awt.Component.processEvent(Unknown Source)
   at java.awt.Container.processEvent(Unknown Source)
   at java.awt.Component.dispatchEventImpl(Unknown Source)
   at java.awt.Container.dispatchEventImpl(Unknown Source)
   at java.awt.Component.dispatchEvent(Unknown Source)
   at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
   at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
   at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
   at java.awt.Container.dispatchEventImpl(Unknown Source)
   at java.awt.Window.dispatchEventImpl(Unknown Source)
   at java.awt.Component.dispatchEvent(Unknown Source)
   at java.awt.EventQueue.dispatchEvent(Unknown Source)
   at com.nomagic.utils.EventTracker.dispatchEvent(EventTracker.java:33)
   at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
   at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
   at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
   at java.awt.Dialog$1.run(Unknown Source)
   at java.awt.Dialog$3.run(Unknown Source)
   at java.security.AccessController.doPrivileged(Native Method)
   at java.awt.Dialog.show(Unknown Source)
   at com.nomagic.ui.Dialog.access$101(Dialog.java:11)
   at com.nomagic.ui.Dialog$1.run(Dialog.java:124)
   at com.nomagic.utils.Utilities.invokeAndWaitOnDispatcher(Utilities.java:1477)
   at com.nomagic.ui.Dialog.show(Dialog.java:117)
   at java.awt.Component.show(Unknown Source)
   at java.awt.Component.setVisible(Unknown Source)
   at java.awt.Window.setVisible(Unknown Source)
   at java.awt.Dialog.setVisible(Unknown Source)
   at com.nomagic.magicdraw.ui.dialogs.BaseDialog.setVisible(BaseDialog.java:394)
   at com.nomagic.magicdraw.ce.core.rtproject.objects.q.w(q.java:323)
   at com.nomagic.magicdraw.ce.core.r.c(r.java:745)
   at com.nomagic.magicdraw.ce.core.r.b(r.java:729)
   at com.nomagic.magicdraw.ce.core.e.ub.actionPerformed(ub.java:44)
   at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
   at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
   at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
   at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
   at javax.swing.AbstractButton.doClick(Unknown Source)
   at javax.swing.plaf.basic.BasicMenuItemUI.doClick(Unknown Source)
   at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(Unknown Source)
   at java.awt.Component.processMouseEvent(Unknown Source)
   at javax.swing.JComponent.processMouseEvent(Unknown Source)
   at java.awt.Component.processEvent(Unknown Source)
   at java.awt.Container.processEvent(Unknown Source)
   at java.awt.Component.dispatchEventImpl(Unknown Source)
   at java.awt.Container.dispatchEventImpl(Unknown Source)
   at java.awt.Component.dispatchEvent(Unknown Source)
   at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
   at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
   at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
   at java.awt.Container.dispatchEventImpl(Unknown Source)
   at java.awt.Window.dispatchEventImpl(Unknown Source)
   at java.awt.Component.dispatchEvent(Unknown Source)
   at java.awt.EventQueue.dispatchEvent(Unknown Source)
   at com.nomagic.utils.EventTracker.dispatchEvent(EventTracker.java:33)
   at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
   at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
   at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
   at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
   at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
   at java.awt.EventDispatchThread.run(Unknown Source)
Free statement (SQLFreeStmt), hStmt=1058153632, fOption=1
*Connection.close
0 Statement(s) to close
Disconnecting (SQLDisconnect), hDbc=1058155816
Closing connection (SQLFreeConnect), hDbc=1058155816


Thanks!

-=> J <=-
jgemmill
Forum Newbie
Forum Newbie
 
Posts: 3
Posts Rating:0
Joined: Thu Oct 14, 2010 11:05 am

Re: MS Access Parsing Problem

Postby jusbis » Mon Oct 18, 2010 6:07 am

Hi,

Thank you for the post. It seems that the problem is with the JDBC driver.
Please search for the Ms Access JDBC drivers at the sun site:
http://industry.java.sun.com/products/jdbc/drivers

Please keep us informed of your progress.
Best regards,

Justinas Bisikirskas
No Magic Inc.
jusbis
Customer Support
Customer Support
 
Posts: 75
Posts Rating:6
Joined: Tue Aug 24, 2010 7:28 am
Location: Kaunas, Lithuania


Return to Code engineering

Who is online

Users browsing this forum: No registered users and 0 guests