Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 import data from excel to sql

Author  Topic 

b00gieman
Starting Member

14 Posts

Posted - 2007-08-16 : 02:12:36
Hi!
I'm trying to import data from an excel file into a sql table.I'm using MS SQL.For import,I use openrowset.The SQL command looks like this(in my asp page):


SQLstr = "SELECT * INTO dbo.shopping_TSR FROM OPENROWSET('Microsoft.Jet.OLEDB.4.0', 'Excel 8.0;Database="+Server.MapPath("\\fileuploader\\upload\\tmb2.xls")+"', 'SELECT * FROM [Sheet1$]')"


I'm getting the following error:
[Microsoft][ODBC SQL Server Driver][SQL Server]OLE DB error trace [OLE/DB Provider 'Microsoft.Jet.OLEDB.4.0' IDBInitialize::Initialize returned 0x80004005: The provider did not give any information about the error.]

What could be the cause of this error?
The .xls file and the sql table are on differen t servers.

Can anyone help?

Thanks in advance.

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2007-08-16 : 02:38:06
Somwhere here you can find it
http://sqlteam.com/forums/topic.asp?TOPIC_ID=49926

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -