DatabaseOperation on Multiple Databases

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

DatabaseOperation on Multiple Databases

Gary Summers-2
I'm trying to write a test case that inserts data into several tables from different databases.  I'm able to generate my XML input file by creating a DatabaseConnection without specifying a database (just the server in the url) and then adding tables to a QueryDataSet using the format queryDataSet.addTable("DATABASE..TABLE").  This works without a problem, writing it to a file using XMLDataSet.write().
 
I try to take this generated XML file, generate an IDataSet and then attempt to perform a CLEAN_INSERT, only to get a NoSuchTableException.
 
Does DBUnit have the ability to take a single XML file with multiple databases and insert it?
 
Thanks.

------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises
looking to deploy the next generation of Solaris that includes the latest
innovations from Sun and the OpenSource community. Download a copy and
enjoy capabilities such as Networking, Storage and Virtualization.
Go to: http://p.sf.net/sfu/opensolaris-get
_______________________________________________
dbunit-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/dbunit-user
Reply | Threaded
Open this post in threaded view
|

Re: DatabaseOperation on Multiple Databases

Matthias Gommeringer
Hi Gary,

maybe it helps to set the http://dbunit.sourceforge.net/properties.html#qualifiedtablenames qualified tablenames feature to true:

IDatabaseConnection conn = new DatabaseConnection(jdbcConn);
conn.getConfig().setFeature(DatabaseConfig.FEATURE_CASE_SENSITIVE_TABLE_NAMES, true);
...

Another interesting link might be http://ericlefevre.net/wordpress/2007/03/22/limitations-when-using-dbunit-in-multi-schema-environment/

HTH,
matthias

> -----Ursprüngliche Nachricht-----
> Von: "Gary Summers" <[hidden email]>
> Gesendet: 02.06.09 17:27:54
> An: [hidden email]
> Betreff: [dbunit-user] DatabaseOperation on Multiple Databases

I'm trying to write a test case that inserts data into several tables

> from different databases. I'm able to generate my XML input file by
> creating a DatabaseConnection without specifying a database (just the
> server in the url) and then adding tables to a QueryDataSet using the
> format queryDataSet.addTable("DATABASE..TABLE"). This works without a
> problem, writing it to a file using XMLDataSet.write().
>
> I try to take this generated XML file, generate an IDataSet and then
> attempt to perform a CLEAN_INSERT, only to get a NoSuchTableException.
>
> Does DBUnit have the ability to take a single XML file with multiple
> databases and insert it?
>
> Thanks.---------------------------------------------------------------
> --------------- OpenSolaris 2009.06 is a cutting edge operating
> system for enterprises looking to deploy the next generation of
> Solaris that includes the latest innovations from Sun and the
> OpenSource community. Download a copy and enjoy capabilities such as
> Networking, Storage and Virtualization. Go to: http://p.sf.net/sfu/
> opensolaris-get_______________________________________________ dbunit-
> user mailing list [hidden email] https://lists.
>
> sourceforge.net/lists/listinfo/dbunit-user


____________________________________________________________
Text: GRATIS für alle WEB.DE-Nutzer: Die maxdome Movie-FLAT!
Jetzt freischalten unter http://movieflat.web.de


------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises
looking to deploy the next generation of Solaris that includes the latest
innovations from Sun and the OpenSource community. Download a copy and
enjoy capabilities such as Networking, Storage and Virtualization.
Go to: http://p.sf.net/sfu/opensolaris-get
_______________________________________________
dbunit-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/dbunit-user