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.
Author |
Topic |
Jmunoz69
Starting Member
6 Posts |
Posted - 2010-05-06 : 13:38:45
|
I am having difficulty correcting error within the ActiveX Script. I know where the problem is, just do not know how to correct.I am using a global variable to get file path and name, this is where the error is, instead of creating a file, it is looking for file. What do I need to modify to make this script work?Please help as I am stuck' File SizeOption ExplicitFunction Main() Dim oFSO Dim oFile Dim sSourceFile Set oFSO = CreateObject("Scripting.FileSystemObject") sSourceFile = DTSGlobalVariables("SourceFileName").Value**** THIS IS WHERE THE ERROR OCCURS **** Set oFile = oFSO.GetFile(sSourceFile) If oFile.Size > 0 Then Main = DTSTaskExecResult_Success Else Main = DTSTaskExecResult_Failure End If ' Clean Up Set oFile = Nothing Set oFSO = NothingEnd FunctionThanksJoseph |
|
X002548
Not Just a Number
15586 Posts |
|
Jmunoz69
Starting Member
6 Posts |
Posted - 2010-05-06 : 17:20:26
|
Thanks Brett |
|
|
sathiesh2005
Yak Posting Veteran
85 Posts |
Posted - 2010-05-08 : 03:04:13
|
use oFSO.CreateTextFile(sSourceFile) to create a file.Regards,Sathieshkumar. R |
|
|
|
|
|