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
 SQL Server 2008 Forums
 SSIS and Import/Export (2008)
 Execute Process Task Variables as Arguments

Author  Topic 

cidr
Posting Yak Master

207 Posts

Posted - 2013-05-12 : 19:42:11
Hi

I have a package with an Execute Process task. The process task executes a custom exe that imports rows into a SharePoint list (a complex one that SP destination containers can't handle)

I pass two arguments to the Task; URL (of the Sharepoint site) and Excel path)


URL and Excel path
@SiteURL: http://devserver/Demo
@ExcelPath: C:\SSIS\Import.xlsx

String variables as Arguments
@SiteURL + " " + @ExcelPath.


Unfortunately I get an error in the command window:

"System.Data.Ole.Db.OleDBExeption : The Microsoft Access database engine could not find the object 'Sheet1$'. Make sure the object exits and that you spell...."

It works fine when the arguments are the actual URL and Excel path. Perhaps I have to configure the varibles in a different way.

Any ideas?

Thanks

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2013-05-13 : 01:21:37
How are you getting the values for URL and Path variables? Are you passing it or do it get from an expression?

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/
https://www.facebook.com/VmBlogs
Go to Top of Page

cidr
Posting Yak Master

207 Posts

Posted - 2013-05-13 : 06:39:23
quote:
Originally posted by visakh16

How are you getting the values for URL and Path variables? Are you passing it or do it get from an expression?


That's possibly where I'm missing something. I'm adding the variables in the variable window with the URL and the Path as the values for each and then adding the variable names to the Arguments.

Do I have to add the variables as expressions? I think I've missed doing something here.

Thanks
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2013-05-13 : 06:46:50
quote:
Originally posted by cidr

quote:
Originally posted by visakh16

How are you getting the values for URL and Path variables? Are you passing it or do it get from an expression?


That's possibly where I'm missing something. I'm adding the variables in the variable window with the URL and the Path as the values for each and then adding the variable names to the Arguments.

Do I have to add the variables as expressions? I think I've missed doing something here.

Thanks


You need to if you've to get values on the fly. The variables have a property called EvaluateAsExpression which should be set to true and then give expression under expression builder available from variable properties window.

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/
https://www.facebook.com/VmBlogs
Go to Top of Page

cidr
Posting Yak Master

207 Posts

Posted - 2013-05-13 : 06:48:24
OK, thanks, I'll give it a go
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2013-05-13 : 06:49:33
fine...let me know if you face any more issues and need any more help.

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/
https://www.facebook.com/VmBlogs
Go to Top of Page
   

- Advertisement -