Quantcast
Channel: ฟอรัม Getting started with SQL Server
Viewing all articles
Browse latest Browse all 8428

Microsoft text driver or access CSV file directly

$
0
0

Hi, 

Every search hit that I found told me that I need the "Microsoft text driver" to access CSV file directly. And here is the sample code within SSMS:

select*
fromopenrowset('MSDASQL'
               ,'Driver={Microsoft Text Driver (*.txt; *.csv)}'
               ,'select * from C:\Temp\test1.CSV')

However, when i tried that, I got the error:

OLE DB provider "MSDASQL" for linked server "(null)" returned message "[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified".
Msg 7303, Level 16, State 1, Line 1
Cannot initialize the data source object of OLE DB provider "MSDASQL" for linked server "(null)".

Further searching reveals that the driver might comes from

Microsoft Access Database Engine

"http://www.microsoft.com/en-ca/download/details.aspx?id=13255"

Having installed it and restarted my DB server instance, I'm still getting the above error. 

How can I get it going? 

PS. I also found another method to access CSV file directly, 

http://social.msdn.microsoft.com/Forums/sqlserver/en-US/22369513-1b4a-40c4-974a-bd641e1ae129/

but that is not under SSMS, but C#. Can I do the same thing under SSMS?

Thanks



Viewing all articles
Browse latest Browse all 8428

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>