SQL Server Performance

What version of VB does DTS actually use?

Discussion in 'SQL Server DTS-Related Questions' started by Will192, Oct 11, 2006.

  1. Will192 New Member

    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 !#$@#$@ 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
  2. Adriaan New Member

    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?
  3. Will192 New Member

    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

Share This Page