[Closed] Urgent: CSV to MDB

Beja

Expert
Licensed User
Longtime User
This job is closed.. thanks to all...

Hi,
I am working on an old system written in vb6, but the data now is coming in csv format:
"FirstRecord","SecondRecord","ThirdRecord".... etc. I need vb6 code snippet using DAO.
Anyone who can help PM me.
 
Last edited:

udg

Expert
Licensed User
Longtime User
Hi Beja,
I am sure you are well aware of converters from csv to mdb, so surely it's me missing the point.
Do you need conversion and vb6 code to manage the newly created db?
BTW, one nice free online converter is the one at www.zamzar.com

udg
 

sorex

Expert
Licensed User
Longtime User
Beja,

You just want an example to import/insert that CSV into an fresh mdb?

If you pm the CSV I'll help you out.
 

eurojam

Well-Known Member
Licensed User
Longtime User
Hello Beja,
the easiest way to import via code is to use the DoCmd like:
B4X:
    DoCmd.TransferText acExportDelim, "Inventory_Specs", "M_Inventory", "Inventory.csv"
let me know if you need more VBA code
 

Troberg

Well-Known Member
Licensed User
Longtime User
It's been a while, but as I remember it, Access can directly import CSV. If it's a one-shot thing, that might be good enough.
 

eurojam

Well-Known Member
Licensed User
Longtime User
It's been a while, but as I remember it, Access can directly import CSV. If it's a one-shot thing, that might be good enough.
That is correct, it is a dialog where you set the parameters separator, column names in header and so on. The doCmd does exactly the same and takes a saved specification. So you can do it both ways and you don't have to spend a lot of coding:) only arround 1$
 
Top