- Local time
- Today, 02:49
- Joined
- Sep 12, 2006
- Messages
- 15,953
:banghead:
Hi.
I have a somewhat similar issue to this thread.
https://www.access-programmers.co.uk/forums/showthread.php?p=1547252#post1547252
Anyway This is My Problem
I am trying to import a csv file without a file spec, to a new table. All appears fine. I delete the existing table and the import creates a new table and imports the data.
However, the next process I need to do fails, because of a type mismatch. It turns out that one of the columns which needs to be text, is actually coming in as a number. Previously the column has come in as text, and there has been no problem. This time, I think too many of the rows near the top are numeric, and access has decided the csv column was numeric. Therefore the import produces type checking errors and some rows have blank values for the converted non-numeric text.
So I tried this fix:
1. delete all the rows to leave an empty table - done
2. change the data type of the offending table to text - done
now i am trying to reimport the csv to the amended table, this time without creating a new table.
Using A2013 the reimport succeeds, but although the data type in the table is now Text (Short Text) the data conversion still fails, and the text values are not imported.
I normally use A2003, but in A2003, the reimport appears to hang, with task manager showing access running at 30-50%. I will try to resolve why it is hanging as a separate issue.
Anyway, even though the process completes in A2013, the data is still rejected with "type conversion error", and the text values are still not set.
I am reluctant to use a file specification for various reasons, but I will try that next to see if that fixes the issue.
[update.
I just tried a file spec.
A2013 imported correctly, with all the values in the suspect column.
A2003 hung again - so I can only presume A2003 has some sort of internal issue resolving what it thinks is a numeric value, with an application requirement for a text value.
The reason I am reluctant to use a file spec is that the column order of the csv just changed, although the column names are all the same. I think the import will come in with the wrong order, if I use a file spec.
]
Finally, I decided to try to link to the table, and then copy the linked items to the table. Exactly the same problem. The linked data shows #num errors for the text values in the numeric column.
So has anyone else had this type of problem, and how did you fix it!
Hi.
I have a somewhat similar issue to this thread.
https://www.access-programmers.co.uk/forums/showthread.php?p=1547252#post1547252
Anyway This is My Problem
I am trying to import a csv file without a file spec, to a new table. All appears fine. I delete the existing table and the import creates a new table and imports the data.
However, the next process I need to do fails, because of a type mismatch. It turns out that one of the columns which needs to be text, is actually coming in as a number. Previously the column has come in as text, and there has been no problem. This time, I think too many of the rows near the top are numeric, and access has decided the csv column was numeric. Therefore the import produces type checking errors and some rows have blank values for the converted non-numeric text.
So I tried this fix:
1. delete all the rows to leave an empty table - done
2. change the data type of the offending table to text - done
now i am trying to reimport the csv to the amended table, this time without creating a new table.
Using A2013 the reimport succeeds, but although the data type in the table is now Text (Short Text) the data conversion still fails, and the text values are not imported.
I normally use A2003, but in A2003, the reimport appears to hang, with task manager showing access running at 30-50%. I will try to resolve why it is hanging as a separate issue.
Anyway, even though the process completes in A2013, the data is still rejected with "type conversion error", and the text values are still not set.
I am reluctant to use a file specification for various reasons, but I will try that next to see if that fixes the issue.
[update.
I just tried a file spec.
A2013 imported correctly, with all the values in the suspect column.
A2003 hung again - so I can only presume A2003 has some sort of internal issue resolving what it thinks is a numeric value, with an application requirement for a text value.
The reason I am reluctant to use a file spec is that the column order of the csv just changed, although the column names are all the same. I think the import will come in with the wrong order, if I use a file spec.
]
Finally, I decided to try to link to the table, and then copy the linked items to the table. Exactly the same problem. The linked data shows #num errors for the text values in the numeric column.
So has anyone else had this type of problem, and how did you fix it!
Last edited: