?
Solved

Import CSV Files

Posted on 2007-04-08
2
Medium Priority
?
259 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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.
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
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:
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…
Suggested Courses
Course of the Month13 days, 13 hours left to enroll

800 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