0

how i could import my txt file into access database 2010 using vb.net .
the txt file as follow :

08-14-13 08:09:26 001 07 0000020016 0100000000
08-14-13 13:12:06 001 07 0000020014 0300000000

i should take into consideration the space between columns becauase this txt file is exported from a certain software

thanks for any help

Edited by elie.karkafy

3
Contributors
6
Replies
17
Views
4 Years
Discussion Span
Last Post by elie.karkafy
0

Yeh i do

acutually i need to create a oledb connection and insert the column of the txt file in the database , bu i shoudl took into consideration the spaces between columns because this text file is exported by default from an attendance software

thx fo your help

0

let me explain

here are my txt file structure :

Filed1       Field2     Field3        Field4       Field5      Field6

08-14-13 08:09:26 001 07 0000020016 0100000000
08-14-13 13:12:06 001 07 0000020014 0300000000

i want to import this txt file into ms access 2010 using oledb connection, each column of my txt file should be created as a field in the database .
for example table name import ( ID , time , date , Empid, state1,state2,state3 ). finally as you see the txt file has different spaces between columns , for example the space between field 1 and field 2 is 4 spaces between field2 and field3 is 5 spaces , because this txt file is exported from a software .

Thx for any help

0

Do you know SQL (Structured Query Language)? If not, then you need to lean at least the basics of it. Here are a few tutorials

I already gave you a link to a free tutorial that explains in detail now top connmect to a database. Just study that chapter.

Here is an example how to tokenize the lines if the text file

Edited by Ancient Dragon

0

i know how to connect to database but i need the method or the query method to insert this txt file into access database , only the query

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.