• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

DbUnit: Problem in getting data from excel sheet

 
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I want to create a dataset using an xls file.

Since excel does not allow a "." in the sheet name, I use [schema_tableName] as the sheet name.

DbUnit cribs that the table name does not exist.

I tried to get data into xls and that worked .

I did the following:



It is creating the table with the sheet name as [schema_table].

But it throws an exception when trying to do a CLEAN_INSERT using this xls file.

If anybody has done this, pls let me know.

Thanks,
Vinayak
 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Vinayak,

I hope you found the answer for the question you asked :-), is it so then leave this one. Otherwise try this one. I hope this one will help you.



This one worked for me, that is while performing CLEAN_INSERT, DatabaseOperation it will try to clear the table using the <b>schema</b> name. That is why I think your code is throwing exception.

Try this, and If it works let me know.

Thanks and Regards
Mohandoss Ilangovan.


//Hi,
//I want to create a dataset using an xls file.

//Thanks,
//Vinayak
 
Mohandoss Ilangovan
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
and one more think to say, while getting your connection using dbconnection, pass your schema name also with the connection.
 
And when my army is complete, I will rule the world! But, for now, I'm going to be happy with this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic