Try to execute SET NOCOUNT ON before running batch. If you do it against
same connection that will execute batch, then it suppose to suppress the
messages. Another way is to attach this instruction to the beginning of your
SQL string and execute all together
"BGL" <BGL@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:6D95FB44-1B5B-43EB-985E-653DAABB0A69@xxxxxxxxxxxxxxxx > Is there a way to completely suppress TSQL 'print' messages in ADO when
> running a SQL batch (not stored procedure)?
>
> Settting CursorLocation=adUseClient does not seem to do the trick.
>
> sqlCmd.ActiveConnection = objConn
> sqlCmd.CommandText = sqlStr ' sqlStr is a batch read in from a
> file
> sqlCmd.CommandType = adCmdText
> sqlCmd.CursorLocation = adUseClient
> sqlCmd.Execute
>
> TIA
>
>
Batch with cursor successful, but not really ... I noticed that if I executed the same batch twice... could then execute the batch. ...DECLARE @Timestamp datetime ... DECLARE @SitePrefix varchar... (microsoft.public.sqlserver)
Batch with cursor successful, but not really ... I noticed that if I executed the same batch twice... could then execute the batch. ...DECLARE @Timestamp datetime ... DECLARE @SitePrefix varchar... (microsoft.public.sqlserver)
Re: Performance when using paramterised queries ... Currently if I want to execute a batch of INSERT's I will join all ... We are building a framework and basically we are using Businessobjects that are completely disconnected from the database, we have a data layer that updates the database from the businessobjects, there could be a 100 types of businessobject in an array that is sent to the data layer, it then constructs all of the SQL statements and sends the lot off to SQL Server in one big concatenation of sql strings.... (microsoft.public.dotnet.languages.csharp)
Re: How to validate a query? ... One thing to watch out for is that the SETs have to be in their own batch,... That is, execute the SET ... NOEXEC ON, then submit your TSQL, then SET NOEXEC OFF. ... >> I have built a dynamic query builder for a project I am on. ... (microsoft.public.sqlserver.programming)
Re: Performance when using paramterised queries ... Currently if I want to execute a batch of INSERT's I will join all the ... For more information on how to enable batch processing,... Why will you have 100 different command objects?... (microsoft.public.dotnet.languages.csharp)