- Local time
- Today, 12:40
- Joined
- Feb 19, 2013
- Messages
- 17,438
I'm trying to determine if OpenRowset works from within an Access (2010) query. I can find plenty of posts about using it in SQL server to access an MS Access db but not about using it in Access.
An example of trying to access a .csv:
select * from OpenRowset('MSDASQL', 'Driver={Microsoft Text Driver (*.txt; *.csv)}; DefaultDir=C:\Temp\','select * from TmpData.csv')
generates a syntax error in from clause error.
Have I got the syntax wrong or does OpenRowset not work? Alternatively is there another way other than linking to the file (which is what I do at the moment)?
Many thanks in advance
An example of trying to access a .csv:
select * from OpenRowset('MSDASQL', 'Driver={Microsoft Text Driver (*.txt; *.csv)}; DefaultDir=C:\Temp\','select * from TmpData.csv')
generates a syntax error in from clause error.
Have I got the syntax wrong or does OpenRowset not work? Alternatively is there another way other than linking to the file (which is what I do at the moment)?
Many thanks in advance