Solved

Import CSV Files

Posted on 2007-04-08
2
218 Views
Last Modified: 2010-03-31
Hi,

I would like to create one more enhancement in my SWING application to import the CSV files and insert them into DB. Well, that sounds easy. However, the CSV files may vary in the columns order and etc so I need to provide the users a way to dynamically mapping to the column in DB.

Right now, I am thinking to create a dynamic query to do this (I think that it should do it). However, does anyone of you have any other idea or better idea?

Thanks
David
0
Comment
Question by:suprapto45
2 Comments
 
LVL 8

Accepted Solution

by:
n_sachin1 earned 250 total points
ID: 18875357
Hi David,
  You can probably look towards creating a table/column name to CVS column header name mapping. Use this information to map the CVS file data to your prepared statements/result sets for insert/update/retrieve functions.
You can do this as a pre-processing action before you pass the information to the queries.
regards
Sachin
0
 
LVL 16

Author Comment

by:suprapto45
ID: 18880141
Thanks.

Sorry for the delay. I will have a look at your comment later on.

David
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now