Import 2 or more csv file data to the table If path of the file selected by user

Hi,

I Import a .csv file data into table to use codeunit. I am not using XMLPORT for this. If the same pk field data comes again then old related fields updated by new data. this is done perfectly. but now i have to import more than one csv files.

so how can i do this because in my code i have open only one file

Are you using two different tables or data from two csv file in one table ??

Thanks Amol,

I am using two or more csv file which is in the folder to single table.

Reply me pls

Avinash

Is both the CSV contains different data or you have split the csv file into two files for faster updation in database. ??

Hi Amol,

I have resolved my problem.

now i want when I import data from the file then that file transfer from that folder to another.

Reply me pls.

Thanks

Avinash

Look At Close function: (close orig file)

http://msdn.microsoft.com/en-us/library/dd339080(v=nav.70).aspx

Then Copy Function (copy the file to a new location)

http://msdn.microsoft.com/en-us/library/dd338627(v=nav.70).aspx

then Erase Function (erase the orig file)

http://msdn.microsoft.com/en-us/library/dd354978(v=nav.70).aspx

I tried to post something but I got a moderator pending pop-up [:(]

The post that currently doesn’t show just mentioned you look at CLOSE,COPY& ERASE functions

get more details here:

http://msdn.microsoft.com/en-us/library/dd338627(v=nav.70).aspx

Thanks for your Reply,

Now i have another problem is when I run codeunit then if any blank file exist in the folder that gives error otherwise which files have data that import to table and transfer to another folder and erase from that folder so now i need to skip blanks files in the folder. so which function i use for this.