importing IP addresses

G

Guest

guys, I am currently working on a project at the office that I need help. I
have created a database of traffic. Two of the fields from the exported CSV
file are IP addresses and they are in normal dotted notation (i.e.
10.138.23.14).

When I import the data manually using file, get external data, import, it
works great. I get the IP address into the file and it looks like it is
above.

However, when I use an automated process using the following command

DoCmd.TransferText acImportDelim, , "Import_test", strFolder & strFile, True

The strFolder & strFile is the location of the files. I have a number of
files to import. When I use the command above it is treating the DOTS in the
IP address as a decimal point, so the number above is inserted into the table
as 10.13823.

My question is how can I automatically import an IP address so that I don't
have to do each days import manually? The automatic import also messes up
the the date. The date in the file is 2006-9-10 and when automatically
imported it is 9/10/2006.

So any help would be greatly apprechated.
 
K

kingston via AccessMonster.com

I hope you don't appreci-hate me for this, but create a file import
specification using the Import Text Wizard via the Advanced... button.
Specify the data types, lengths, etc. and save the specification so that you
can refer to it in your code.

You can also try creating tables with properly defined data types first. Use
your manually imported data to start you off. Then, create links to the CSV
files, and use append queries to import the data into the tables.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top