PDA

View Full Version : SQL 2K to 2K5 migration of VB Script to VB.NET



untitled
09-01-2008, 02:54 AM
'**********************************************************************
' Visual Basic ActiveX Script
'************************************************************************

Function Main()
Dim indtastning

boxPeriod = inputbox (vblf & "Input periodid : " & vblf & "3 = January, 4 = February, 5 = March" & vblf & "7 = April, 8 = May, 9 = June" & vblf & "11 = July, 12 = August, 13 = September" & vblf & "15 = October, 16 = November, 17 = December","Input period")
DTSGlobalVariables("periodid").Value = boxPeriod

boxYear = inputbox (vblf & "Input year : " ,"Input year")
DTSGlobalVariables("year").Value = boxYear

' msgbox (DTSGlobalVariables("year").Value)
Main = DTSTaskExecResult_Success
End Function

I'm new to .NET, the problem I have is that 2K5 no longer recognises the DTSGlobalVariables.

Any ideas, pointers gratefully recieved.

Tia.