invalid object name when dumping tables in different schema

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

invalid object name when dumping tables in different schema

Tom Chiverton

I just looking at DbUnit, but can't seem to dump our tables.

The code under test needs to talk to several schemas, so I have to be able to do this, but the error is
  [java] org.dbunit.dataset.DataSetException: java.sql.SQLException: [XXXX]Invalid object name 'dbo.bbbb'.
     [java]     at

It doesn't seem to matter what syntax I use in the call to addTable() in code like this :

        Class driverClass = Class.forName( "com.inet.tds.TdsDriver" );
       Connection jdbcConnection = DriverManager.getConnection(
            "xxx", "xxxx"
       IDatabaseConnection connection = new DatabaseConnection(jdbcConnection);
        DatabaseConfig config=connection.getConfig();
        config.setFeature(DatabaseConfig.FEATURE_QUALIFIED_TABLE_NAMES ,true);

        // partial database export
        QueryDataSet partialDataSet = new QueryDataSet(connection);
        FlatXmlDataSet.write(partialDataSet, new FileOutputStream("partial.xml"));

Any ideas what I can try ?

extravision Signature
Tom Chiverton | Lead Developer | Extravision
T: 0161 817 2922 | W: | T: | E: [hidden email]
 A fresh approach to email marketing 
Registered in the UK at : 107 Timber Wharf, 33 Worsley Street, Manchester, M15 4LD. Registration number: 05017214 VAT: GB 824 5386 19

Disclaimer: This e-mail is intended solely for the person to whom it is addressed and may contain confidential or privileged information. If you have received it in error please notify us immediately and destroy this e-mail and any attachments. In addition, you must not disclose, copy, distribute or take any action in reliance on this e-mail or any attachments. Any views or opinions presented in this e-mail are solely of the author and do not necessarily represent those of Extravision Ltd. E-mail may be susceptible to data corruption, interception, unauthorised amendment, viruses and delays or the consequences thereof. Accordingly, this e-mail and any attachments are opened at your own risk.

Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
dbunit-user mailing list
[hidden email]