![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I am trying to import data from an Excel spreadsheet into my SQL database. I am running SQL 2005. I following Microsoft's instructions for creating a linked server, and it appeared to work. However when I run this query: SELECT * INTO test FROM OPENQUERY(EFORMS, 'SELECT * FROM [Form Tracker Baseline$]') I get the following error: The OLE DB provider "Microsoft.Jet.OLEDB.4.0" for linked server "EFORMS" reported an error. The provider did not give any information about the error. Msg 7303, Level 16, State 1, Line 1 Cannot initialize the data source object of OLE DB provider "Microsoft.Jet.OLEDB.4.0" for linked server "EFORMS". Test is the table that will receive the imported data. Eforms is the name of my linked server, and Form Tracker Baseline is the worksheet name. The error sounds like it can not locate my spreadsheet. Any ideas why I am getting this message? |
|
Is there an easier way to do this import? |
#3
| |||
| |||
|
|
If I had an Excel book that I wanted to import to SQL Server, I would save it as a comma-separated file and then use BCP. Don't really know whether that is easier, but it's the only way I know... |
#4
| |||
| |||
|
|
Erland Sommarskog wrote: If I had an Excel book that I wanted to import to SQL Server, I would save it as a comma-separated file and then use BCP. Don't really know whether that is easier, but it's the only way I know... SSIS (ala OLE DB). *Works like a charm.... aj |
#5
| |||
| |||
|
|
Hey guys, I am trying to import data from an Excel spreadsheet into my SQL database. I am running SQL 2005. I following Microsoft's instructions for creating a linked server, and it appeared to work. However when I run this query: SELECT * INTO test FROM OPENQUERY(EFORMS, 'SELECT * FROM [Form Tracker Baseline$]') I get the following error: The OLE DB provider "Microsoft.Jet.OLEDB.4.0" for linked server "EFORMS" reported an error. The provider did not give any information about the error. Msg 7303, Level 16, State 1, Line 1 Cannot initialize the data source object of OLE DB provider "Microsoft.Jet.OLEDB.4.0" for linked server "EFORMS". Test is the table that will receive the imported data. Eforms is the name of my linked server, and Form Tracker Baseline is the worksheet name. The error sounds like it can not locate my spreadsheet. Any ideas why I am getting this message? Is there an easier way to do this import? Thanks, |
![]() |
| Thread Tools | |
| Display Modes | |
| |