abcd12_us
asked on
linking a textfile into access databse using ADO in visual basic
I'm having data in text files , so I need to convert that data to microsoft access database using ADO in visual basic.
thanks,
looking for ur replay.
thanks,
looking for ur replay.
Why not link the table directly through Access as a linked text table?
Otherwise, you could use the file open command to open and read the text file. You can put the text data into an array. Then you would open the Access db with ADO connection and recordset objects. With the recordset open you can loop through the array and add the records to the recordset.
Otherwise, you could use the file open command to open and read the text file. You can put the text data into an array. Then you would open the Access db with ADO connection and recordset objects. With the recordset open you can loop through the array and add the records to the recordset.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
thanx for ur reply.
Assuming they are delimited and all are the same format, you can open them using the delimited file importer:
- New table,
- select "Import Table",
- select a .txt file,
- and follow the prompts in the import wizard.
To automate, you can create a VB script to do this.
If you're having to repeatedly import to an existing table, you will need to use VB to open an ODBC datasource that points to the text file you need, import it using VB.