hi,
 I followed the sample in the 'howto Guides' to export a dataset from my database, and it throw the        org.dbunit.database.AmbiguousTableNameException. My database is Oracle, and all my tables are just one named ttt.
here is my code:
 public static void main(String[] args) throws Exception
 {
  // database connection
  Class driverClass = Class.forName("oracle.jdbc.driver.OracleDriver");
  Connection jdbcConnection = DriverManager.getConnection(
    "jdbc:oracle:thin:@127.0.0.1:1521:lix", "test", "t");
  if(jdbcConnection.isClosed()) {
   System.out.println("ffff");
  }else {
   System.out.println("ttttt");
  }
  // I select all data from database, and than I can know my connection is no problem.
  // and, it works.
  ResultSet rs = jdbcConnection.createStatement().executeQuery("select * from ttt");
  while(rs.next()) {
   System.out.println(rs.getInt("nnn"));   
   System.out.println(rs.getString("vv"));
  }
  
  IDatabaseConnection connection = new DatabaseConnection(jdbcConnection);
  // partial database export
//  String[] tableNames = {"ttt"};
//  IDataSet partialDataSet = connection.createDataSet(tableNames);
//  FlatXmlDataSet.write(partialDataSet, new FileOutputStream("test.xml"));
  // full database export
  IDataSet fullDataSet = connection.createDataSet();
  
  FlatXmlDataSet.write(fullDataSet, new FileOutputStream("full.xml"));
 }
// code end
here is the output:
ttttt
11
ddd
22
ccc
org.dbunit.database.AmbiguousTableNameException: COUNTRIES
 at org.dbunit.database.DatabaseDataSet.initialize(DatabaseDataSet.java:134)
 at org.dbunit.database.DatabaseDataSet.getTable(DatabaseDataSet.java:199)
 at Test.main(Test.java:47)
Exception in thread "main"
// output end
I don't know how to do than, because my database is most simple and my code is copy from the
sample in the 'howto Guides', and the connection can work.
 thanks!(and so sorry for my poor english.)
     
        lix
        lixrxyy@yahoo.com.cn
          2003-10-20                        

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com