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 2008 Forums
 SSIS and Import/Export (2008)
 Script Task Check Syntax

Author  Topic 

jmill130
Starting Member

26 Posts

Posted - 2009-05-20 : 10:50:14
How can I easily see the output of a line of code using script task and VB 2008 syntax.

Ex: I have the below line of code:

testdow is an int16 declared as variable at the package level inside visual studio.

-------
Dts.Variables("testdow").Value = DatePart(DateInterval.Weekday, Today())
--------

How can i easily compile that one line of code to see the output. I keep getting the follow error when i execute my script task.

"User::testdow" differs from the current variable type. Variables may not change type during execution."

However, as far as i know datepart returns and int type and my variable is type int. I want to easily be able to check my syntax since i am new to vb08 syntax. I know in vb6 there was an intermediate output window where you could type in code and test it to see what the output is..

FYI:
What i am trying to do is based on the day of the week i will be determine the where clause in a sql statement. So far i am not even having any luck with the datepart to find out which day of the week it is..

Hopefully i am just missing something in visual studio/vb 2008.

thanks
-J

cat_jesus
Aged Yak Warrior

547 Posts

Posted - 2009-06-23 : 13:15:28
Did you try msgbox(variable) ???

You can also step through the code with the debugger

An infinite universe is the ultimate cartesian product.
Go to Top of Page
   

- Advertisement -