Answered by:
Error when sttempting to import or link to csv

Question
-
Using Access 2010 and am trying to either import or link to a csv file. No matter what, I get the error "Syntax error in CREATE TABLE statement".
I can open the csv in Excel but need to open it in Access.
I'm attempting the import by using the ribbon command: Text File...Link. Not using VBA.
Thoughts or ideas?
Thanks.
emcustom
- Edited by emcustom Friday, February 19, 2016 9:22 PM
Friday, February 19, 2016 9:19 PM
Answers
-
Thanks for the tip.
The import file was named "Create Space". The designer changed it to "XCreate Space" and the import worked as it should. So Access must have seen the word "Create" as a command.
emcustom
- Marked as answer by David_JunFeng Sunday, February 28, 2016 2:22 PM
Tuesday, February 23, 2016 2:13 AM
All replies
-
Using Access 2010 and am trying to either import or link to a csv file. No matter what, I get the error "Syntax error in CREATE TABLE statement".
I do not see how linking would produce that error as no table is being created.
Give more details -- step by step explanation of what tried.
Build a little, test a little
Friday, February 19, 2016 9:48 PM -
I think the problem got solved rather quickly. Will have to wait until Monday to be sure.
The csv's are created in an application called 2020 Design which is used for designing office and room spaces. The csv's are normally imported into an Access database by way of VBA. This has worked fine until today.
I attempted to manually import a csv, by using the command on the ribbon and got this error.
Even though windows explorer says it is a csv, it was actually unicode. I saved it as a csv file and was then able to import the csv. I then found out that the designer may not be using the correct version of 2020 and needs to downgrade. If that's the case, then problem solved.
Thanks for your response.
emcustom
Friday, February 19, 2016 10:04 PM -
>>>Even though windows explorer says it is a csv, it was actually unicode. I saved it as a csv file and was then able to import the csv. I then found out that the designer may not be using the correct version of 2020 and needs to downgrade. If that's the case, then problem solved.
According to your description, have you resolved your issue, if not, I suggest that when you manually link to your text file, you could click on the Advanced button (bottom left hand corner of wizard), you get the option to refine the definition:
Monday, February 22, 2016 6:15 AM -
Thanks for the tip.
The import file was named "Create Space". The designer changed it to "XCreate Space" and the import worked as it should. So Access must have seen the word "Create" as a command.
emcustom
- Marked as answer by David_JunFeng Sunday, February 28, 2016 2:22 PM
Tuesday, February 23, 2016 2:13 AM