>If I execute a script like this to execute against SQL Server:
>
>
>' Initialize the SMO object
>loSQLConnection = New SqlConnection(lcConnectionString)
>loServerConnection = New ServerConnection(loSQLConnection)
>loServer = New Server(loServerConnection)
>
>' Execute the script
>loServer.ConnectionContext.ExecuteNonQuery(lcScript)
>
>
>Would there be a way to capture the output from the Messages tab, which is usually applicable when we execute the script in the SSMS?
Check
http://forums.asp.net/p/1347665/2743340.aspx#2743340
If it's not broken, fix it until it is.
My Blog