Import from excel problem | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

Import from excel problem

I have an excel file that I want to be able to load into my SQL Server table by the click of a button in my ASP.NET project.<br /><br />I have created a DTS package using the import/export wizard and also a stored procedure to execute the DTS package.<br /><br />This works fine if the excel file is on my desktop but when I try to use a file on a shared network drive it fails and I get the following error :<br /><br /><br />DTSRun: Loading… <br />DTSRun: Executing… <br />DTSRun OnStart: Create Table [GE].[dbo].[DTSTest2] Step <br />DTSRun OnFinish: Create Table [GE].[dbo].[DTSTest2] Step <br />DTSRun OnStart: Copy Data from Results to [GE].[dbo].[DTSTest2] Step <br />DTSRun OnError: Copy Data from Results to [GE].[dbo].[DTSTest2] Step, Error = -2147467259 (80004005) <br /> Error string: The Microsoft Jet database engine cannot open the file ‘H:Book1.xls’. It is already opened exclusively by another user, or you need permission to view its data. <br /> Error source: Microsoft JET Database Engine <br /> Help file: <br /> Help context: 5003051 <br /> <br />Error Detail Records: <br /> <br />Error: -2147467259 (80004005); Provider Error: -534709256 (E020FBF<img src=’/community/emoticons/emotion-11.gif’ alt=’8)’ /> <br /> Error string: The Microsoft Jet database engine cannot open the file ‘H:Book1.xls’. It is already opened exclusively by another user, or you need permission to view its data. <br /> Error source: Microsoft JET Database Engine <br /> Help file: <br /> Help context: 5003051 <br /> <br />DTSRun OnFinish: Copy Data from Results to [GE].[dbo].[DTSTest2] Step <br />DTSRun: Package execution complete. <br />NULL<br /><br /><br /><br />Also ideally I want the user to be able to specify the path to the excel file. Is this possible somehow?
"Also ideally I want the user to be able to specify the path to the excel file. Is this possible somehow?" You can use the Dynamic Properties Task to change DTS task settings at run time. Raulie
Hewlett-Packard

]]>