X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
   Reply to this topicStart new topic
> Importing An Ip Address From .csv, Access 2016    
post Dec 8 2017, 05:14 PM

Posts: 305
Joined: 13-May 06
From: IA

I have an OnClick event that imports data from a .csv into fields in a table. Everything works great except for an IP Address field. in the .csv file it shows correctly However, after the import, the field (formatted as short text) in the access table shows 192.1681 What am I missing here??

Totally, Completely, Utterly Confused
Go to the top of the page
John Vinson
post Dec 8 2017, 08:09 PM

UtterAccess VIP
Posts: 4,197
Joined: 6-January 07
From: Parma, Idaho, US

Since a .csv file (or an Excel spreadsheet, for that matter) has no datatypes, Access must guess the appropriate datatype based on the first few records. Since 192.168 could plausibly be interpreted as a decimal number, it appears that the program is making that (wrong) guess.

You should be able to use an Import Specification to explicitly define this field as being of Text datatype.

John W. Vinson
Wysard of Information
Go to the top of the page
post Dec 9 2017, 08:03 AM

Posts: 925
Joined: 26-March 08
From: London, UK

In addition to John's suggestion, you can insert a dummy 1st data row in your csv file which has a text value in every column (i.e. values that can only be interpreted as text). Once you've imported the data, you then delete the dummy row before doing whatever you want with the data.


Go to the top of the page

Custom Search
RSSSearch   Top   Lo-Fi    18th March 2018 - 12:35 PM