• 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
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

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.
 
For my next feat, I will require a volunteer from the audience! Perhaps this tiny ad?
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic