SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
Register Now and get your question answered!
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  

Starting Member

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.

Very Important crosS Applying yaK Herder

52326 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

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.05 seconds. Powered By: Snitz Forums 2000