SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2005 Forums
 .NET Inside SQL Server (2005)
 vb.net need help in file path
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

raghav99k
Starting Member

India
32 Posts

Posted - 11/28/2011 :  05:32:14  Show Profile  Reply with Quote
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

India
52317 Posts

Posted - 11/28/2011 :  07:25:30  Show Profile  Reply with Quote
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/


Edited by - visakh16 on 11/28/2011 07:25:56
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.06 seconds. Powered By: Snitz Forums 2000