What version of VB does DTS actually use? | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

What version of VB does DTS actually use?

Ok, I am frustrated. I specify my active X object to use VB Script as the language for my code. Half of the VB code that I write won’t work in the object. I mean SIMPLE things like the Now() and Date() functions aren’t supported. I have done searches on VB script and these functions are suppose to be there. Anyway, here’s the code that I am trying to get to work in my DTS job: Dim TodayDate
Set TodayDate = Now() I am trying to put the current date and time into a variable. It parses fine, but I get an Error on the second line expecting an object after the equals sign. What the !#[email protected]#[email protected] is going on? I gotta be missing something simple here. Thanks in advance for any responses to this post. Live to Throw
Throw to Live
You’re confusing T-SQL and VB. In VB, you use Set to set object variables, but not to assign a value to a variable of a given data type. Try this: Dim TodayDate
TodayDate = Now() *** You know what you can expect with various regional settings?
That would make sense about the Set use with an object. That is why it is working for my other lines of code and not that one. Thanks for the quick response. Live to Throw
Throw to Live