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 2005 Forums
 .NET Inside SQL Server (2005)
 vb.net need help in file path

Author  Topic 

raghav99k
Starting Member

32 Posts

Posted - 2011-11-28 : 05:32:14
Dim filename As String = "C:\Documents and Settings\Desktop\ALLFILES\NAME_" & Date.Today.ToString("yyyy_MM") & "\INC_" & Date.Today.ToString("yyyy_MM") & ".xls"

when i am using the same path in script task..it is throwing error..

Can u pls provide how to handle this.

here folder name is also dynamic which wil create using file system task,,to the same folder this file has to create with current date

Thanks in advance.

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2011-11-28 : 07:25:30
folder name and all others which are dynamic can be stored in variables created inside package. then for filename set another variable with EvaluateAsExpression property true and set the expression like

@[User::FolderName] + @[System::StartTime] + "\\INC_" + @[System::StartTime] + ".xls"


and no need of separate script task to set it
------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page
   

- Advertisement -