SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Script Task Issue


Script Task Issue

Author
Message
LOOKUP_BI-756009
LOOKUP_BI-756009
SSCommitted
SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)

Group: General Forum Members
Points: 1685 Visits: 1485
Im having trouble getting Console.Writeline() to work in Script Task [VB.Net].Visual Studio 2008

There is no pop up of Console window showing up.

Here is just a simple code Im trying with, and I have added the "C:\WINDOWS\Microsoft.NET\Framework\v3.5" to Path variable in Environment Var and ensured vbc.exe exist in this folder.

Public Sub Main()
Dim str As String
str = "Testing Testing"
Console.WriteLine(str)
Console.ReadLine()
'Added msg box just for testing, and this works fine !
MessageBox.Show(str)
End Sub

I need to get this working so I can test the real code that Im working on......Pinch
GSquared
GSquared
SSC Guru
SSC Guru (56K reputation)SSC Guru (56K reputation)SSC Guru (56K reputation)SSC Guru (56K reputation)SSC Guru (56K reputation)SSC Guru (56K reputation)SSC Guru (56K reputation)SSC Guru (56K reputation)

Group: General Forum Members
Points: 56297 Visits: 9730
I could be wrong, but I don't think SSIS supports that. It's not designed to work with a consol, it's really supposed to run without any sort of front end, on an unattended server.

Might work to write the values you want to a log table or log file, since it is designed to do those things.

I'm far from an expert on scripting, so don't take this as any sort of expert statement. (My specialties are designing and coding in the database, not scripting in SSIS.)

- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread

"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
Phil Parkin
Phil Parkin
SSC Guru
SSC Guru (50K reputation)SSC Guru (50K reputation)SSC Guru (50K reputation)SSC Guru (50K reputation)SSC Guru (50K reputation)SSC Guru (50K reputation)SSC Guru (50K reputation)SSC Guru (50K reputation)

Group: General Forum Members
Points: 50327 Visits: 21152
Why not just set a breakpoint or two and then run the package? You'll get into a full, interactive debugging session, much richer than writing out the odd result to the console.


Help us to help you. For better, quicker and more-focused answers to your questions, consider following the advice in this link.

If the answer to your question can be found with a brief Google search, please perform the search yourself, rather than expecting one of the SSC members to do it for you.

Please surround any code or links you post with the appropriate IFCode formatting tags. It helps readability a lot.
LOOKUP_BI-756009
LOOKUP_BI-756009
SSCommitted
SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)

Group: General Forum Members
Points: 1685 Visits: 1485
Will do that.Thanks
CozyRoc
CozyRoc
SSCertifiable
SSCertifiable (6.5K reputation)SSCertifiable (6.5K reputation)SSCertifiable (6.5K reputation)SSCertifiable (6.5K reputation)SSCertifiable (6.5K reputation)SSCertifiable (6.5K reputation)SSCertifiable (6.5K reputation)SSCertifiable (6.5K reputation)

Group: General Forum Members
Points: 6490 Visits: 2235
LOOKUP_BI-756009 (1/11/2010)
Im having trouble getting Console.Writeline() to work in Script Task [VB.Net].Visual Studio 2008

There is no pop up of Console window showing up.

Here is just a simple code Im trying with, and I have added the "C:\WINDOWS\Microsoft.NET\Framework\v3.5" to Path variable in Environment Var and ensured vbc.exe exist in this folder.

Public Sub Main()
Dim str As String
str = "Testing Testing"
Console.WriteLine(str)
Console.ReadLine()
'Added msg box just for testing, and this works fine !
MessageBox.Show(str)
End Sub

I need to get this working so I can test the real code that Im working on......Pinch


This is not the correct approach. If you want to trace and debug your package, you can use the standard SSIS facilities and objects for logging and events. For example to generate an event with test information use the following code:


Dim fa As Boolean
Call Dts.Events.FireInformation(0, "My Script", "Your Test Message", String.Empty, 0, fa)



---
SSIS Tasks Components Scripts Services | http://www.cozyroc.com/


Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search