July 2, 2007 at 9:22 pm
Hi,
Basically I do not have any knowledge in VB Script. But I need to have some do migration from current DTS which is using activeX script to SSIS package manually. There is one of the task is to have some custom log to a text file by ActiveX script and I need to migrate it to SSIS task script, but I do not have any idea how the script show be... Search from web, for VB script, it can be done by using the FSO (File System Object). They also provided the code for simple creation and write up as below.
Dim objFile, strGuyFile, strFilePath
strFilePath = "e:\files\strGuyFile.txt"
Set objFile = CreateObject("Scripting.FileSystemObject")
Set strGuyFile = objFile.CreateTextFile(strFilePath, True)
strGuyFile.WriteLine("This was made using VBScript.")
strGuyFile.Close
But when I copy exactly to task script, it seems not working, keep telling all variable declaration to have 'As' clause, may I know what should I declare these object As? FSO? but it return there is no What is the library I need to import to make it works? Thanks!
July 3, 2007 at 1:59 am
Stay away from the active x script. It is end of line and would be removed soon(?)
if you really want to log using VB, you would use StreamWriter object.
Here are many examples: http://www.google.co.uk/search?q=writing+text+file+vb.net&sourceid=navclient-ff&ie=UTF-8&rlz=1B3GGGL_enGB213GB213
Also check google for custom SSIS logging. There are plenty of nice custom loggers out there.
What is wrong with the built in logging in ssis?
Cheers,CrispinI can't die, there are too many people who still have to meet me!It's not a bug, SQL just misunderstood me!
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply