Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Script Task Issue Expand / Collapse
Author
Message
Posted Monday, January 11, 2010 9:14 AM
SSC-Addicted

SSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-Addicted

Group: General Forum Members
Last Login: Monday, November 10, 2014 2:54 PM
Points: 413, Visits: 1,356
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......
Post #845495
Posted Monday, January 11, 2010 9:30 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: 2 days ago @ 9:58 AM
Points: 13,872, Visits: 9,600
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
Post #845512
Posted Monday, January 11, 2010 1:00 PM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 2:15 AM
Points: 5,317, Visits: 12,354
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.

When you ask a question (and please do ask a question: "My T-SQL does not work" just doesn't cut it), please provide enough information for us to understand its context.

It is better to keep your mouth shut and appear stupid than to open it and remove all doubt. (Mark Twain)
Post #845660
Posted Monday, January 11, 2010 1:02 PM
SSC-Addicted

SSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-Addicted

Group: General Forum Members
Last Login: Monday, November 10, 2014 2:54 PM
Points: 413, Visits: 1,356
Will do that.Thanks
Post #845661
Posted Wednesday, January 13, 2010 8:35 AM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Sunday, September 14, 2014 3:17 PM
Points: 1,118, Visits: 2,224
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......


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/

Post #846946
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse