View Full Version : Data importing


cristimoldovan
02-18-2008, 11:39 PM
Hi everione

I have to make a db that imports data from a textfile. I read the posts about automating the proces but I have two other problems. The text file is generated by a proces control software and has a .gbc extension ( I tried to solve this by importing to excel and then to acces) and the textfiles has a limited number of entries araound 300 so after al the records in the textfile are writen the records are overwriten. Is it posibel to make acce to read only the new records and adi it to a table witouth deleting the old records? the record has a date and time included.
Im a acces user for only two weeks so i would be greatful for any help.

gemma-the-husky
02-19-2008, 09:21 AM
the name of the text file is unimportant

do file import manually and create a file specification, as it will speed things up later

then use dcomd.transfertext to import the file using the saved file spec

cristimoldovan
02-19-2008, 10:04 PM
the name of the text file is unimportant

do file import manually and create a file specification, as it will speed things up later

then use dcomd.transfertext to import the file using the saved file spec

Thanks.
Stil I would like to know if i kan import only new records because the records are overwriten after 200 records are generated, so I would need to import every day only the new records.

gemma-the-husky
02-20-2008, 01:38 AM
the best way is as follows

maintain a full working table in the dbs

import the text file to a temporary table in the dbs

then compare the temp file with the full file, and add any new items to the full table

-------
you could possibly link to the text file, and do this without loading the data, but i think it is easier to actually import it

cristimoldovan
02-20-2008, 03:49 AM
Thanks I wil try this

Dennisk
02-20-2008, 05:55 AM
the extension does matter, certainly with A97 and A2000. if the extension is not a recognised extension .csv, .txt, .xls and one or two others then it will not import and you will get an 'out of memory ' message.

However for once this is eacsy cured by adding the extension into the list in the registry.
Or just change the extension to a recognised one before importing.

other versions may function differently.