error 0. syntax error -
09-29-2006
, 01:52 PM
Hi!
I would really appreciate any help on this.
I am getting error 0. syntax error in the following activex:
Function Main()
'Const DTSSQLStgFlag_UseTrustedConnection = 256
Dim oPKG
Dim i
Dim sFolder
Dim oPKGb
Dim ib
Dim sFolderb
sFolder = "E:\Run\"
Dim fso, f, f1, fc, s
Dim fsob, fb, f1b, fcb, sb
Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fso.GetFolder(sFolder)
Set fc = f.Files
For Each f1 in fc
if right(f1.name,3) = "CLM" then
Set oPKG = CreateObject("DTS.Package")
oPKG.LoadFromSQLServer ".", , , 256, , , , "Load_Claims"
Set cn = oPKG.Connections("Text File (Source)")
cn.DataSource = sFolder & f1.name
oPKG.Execute
oPKG.Uninitialize()
Set oPKG = Nothing
sFolder = "E:\Run\"
Set fsob = CreateObject("Scripting.FileSystemObject")
Set fb = fsob.GetFolder(sbFolder)
Set fcb = fb.Files
For Each f1b in fcb
if f1b.name = left(f1.name,8) + '.SRV' then
Set oPKGb = CreateObject("DTS.Package")
oPKGb.LoadFromSQLServer ".", , , 256, , , , "Load_Services"
Set cnb = oPKGb.Connections("Text File (Source)")
cnb.DataSource = sbFolder & f1b.name
oPKGb.Execute
oPKGb.Uninitialize()
Set oPKGb = Nothing
sbFolder = "E:\Run\"
end if
Next
end if
Next
Main = DTSTaskExecResult_Success
End Function
This is supposed to loop through the folder e:\run first to find .clm
and after to find the same file name but with extension.srv.
Thanks!
T |