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.

 All Forums
 SQL Server 2000 Forums
 Import/Export (DTS) and Replication (2000)
 any one see what I'm doing wrong in this vb script

Author  Topic 

shebert
Yak Posting Veteran

85 Posts

Posted - 2009-09-08 : 14:36:09
was thinking something like this but it gets error

Public Sub Main()
'

Dim fileName As String = CStr(Dts.Variables("WaferFiles").Value)

' Returns "World!".
Dim subString As String = Microsoft.VisualBasic.Right(fileName, 17)
Dim subString2 As String = Microsoft.VisualBasic.Left(subString, 13)
Dim sheetName As String = subString2 + "$"


Dts.Variables("WorksheetName").Value = sheetName

Dts.TaskResult = Dts.Results.Success


End Sub

edit: moved to proper forum
   

- Advertisement -