Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Import CSV Files

Posted on 2007-04-08
2
Medium Priority
?
266 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 8

Accepted Solution

by:
n_sachin1 earned 1000 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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…
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.
Suggested Courses

618 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