Solved

data import from excel to access

Posted on 2002-04-30
4
139 Views
Last Modified: 2010-05-02
i want to make such interface that first choose the database whether MS Access or SQL Server where data hast to be imported from excel file.Then according to the database selected, choose access file or sql database.After that choose the table (assuming that the fields in the excel file and fields in access or sql server table are same)then choose the excel file from which data has to be imported to the access file or sql databse.

while importing data the care should be taken that if there are any changes in the existing records in excel those have to be updated in the access file or sql database.And the new records should be appended. while updating ask the user that "data already exists, do u want to overwrite or not" like yes, yes to all, no, no to all msgbox.

how can it be done using class because this has to be done in ASP again. In ASP we cannot get the message box and all so it would be great if you could send me codes for this problem.If possible could you please send me the ASP codes for the same.

i need to make it as component later.could you please tell me how can i make this a component.

hope to hear shortly

thanks!



0
Comment
Question by:blueberry113
  • 3
4 Comments
 
LVL 3

Expert Comment

by:n_narayanan
Comment Utility
0
 
LVL 3

Accepted Solution

by:
n_narayanan earned 100 total points
Comment Utility
For New Records you can append using this code

http://www.freevbcode.com/ShowCode.Asp?ID=1302

Narayanan
0
 

Author Comment

by:blueberry113
Comment Utility
thanks a lot for your help.

actually i dont need to create any access file.
1.assume that there's already an excel file and access file with table(fields are similar to the excel).we have to use common dialog control to browse those files.

2.select an access file and table(displaying tables of corresponding access file), then select excel file from which data needs to be imported.

3.lets suppose at first we import data from excel to access. then if we append some data in excel those records have to be appended in the access file when we click on IMPORT button.But if there are any changes in the existing records as well as some new records in excel file  then the records should be updated as well as new records should be appended in access file.

4.we have to check thro ID only.If we find any changes in the existing records then we have to give message that this data exits, do u want to overwrite or not.we can give options like update, update all,cancel and cancel all.

5.i have almost done this but i need to make this using CLASS.

it would be appreciated a lot if you could send me the codes for the above using Class.

thanks!
0
 
LVL 3

Expert Comment

by:n_narayanan
Comment Utility
Thanks blueberry

If your code is working, we can easy convert that into Class. Send me your code, I will try to convert it into class module.

n_narayanan@yahoo.com

Narayanan
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

728 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

10 Experts available now in Live!

Get 1:1 Help Now