Hello,
in SQL scripts I can use GO to force query analyzer to finalize the batch
above. Before continuing with execution of code. This is needed i.e. when i
add a new column before i can fill it.

Is there an equivalent statement that can be used when hte script is loaded
from file and executed with adonet (sqlclient) or do I have to split the
script file?

Thanks
Patrick

Re: using go in a sql batch by William

William
Tue Mar 11 12:13:44 CDT 2008

Nope, you'll need to emulate the behavior of the SQLCMD or the SSMS query
editor window. I have an example of this in the book as I used it as a lab
exercise in my TSQL classes (years ago).

--
__________________________________________________________________________
William R. Vaughn
President and Founder Beta V Corporation
Author, Mentor, Dad, Grandpa
Microsoft MVP
(425) 556-9205 (Pacific time)
Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
____________________________________________________________________________________________
"Patrick Jox" <pj@kap##nospam##aya.com> wrote in message
news:%23sw7mt3gIHA.5088@TK2MSFTNGP02.phx.gbl...
> Hello,
> in SQL scripts I can use GO to force query analyzer to finalize the batch
> above. Before continuing with execution of code. This is needed i.e. when
> i add a new column before i can fill it.
>
> Is there an equivalent statement that can be used when hte script is
> loaded from file and executed with adonet (sqlclient) or do I have to
> split the script file?
>
> Thanks
> Patrick
>


Re: using go in a sql batch by Patrick

Patrick
Wed Mar 12 03:21:10 CDT 2008

OK, Thanks.

Kind Regards
Patrick


"William Vaughn" <billvaNoSPAM@betav.com> schrieb im Newsbeitrag
news:750E7020-F998-4883-B2BD-9ED99F7B3F17@microsoft.com...
> Nope, you'll need to emulate the behavior of the SQLCMD or the SSMS query
> editor window. I have an example of this in the book as I used it as a lab
> exercise in my TSQL classes (years ago).
>
> --
> __________________________________________________________________________
> William R. Vaughn
> President and Founder Beta V Corporation
> Author, Mentor, Dad, Grandpa
> Microsoft MVP
> (425) 556-9205 (Pacific time)
> Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
> ____________________________________________________________________________________________
> "Patrick Jox" <pj@kap##nospam##aya.com> wrote in message
> news:%23sw7mt3gIHA.5088@TK2MSFTNGP02.phx.gbl...
>> Hello,
>> in SQL scripts I can use GO to force query analyzer to finalize the batch
>> above. Before continuing with execution of code. This is needed i.e. when
>> i add a new column before i can fill it.
>>
>> Is there an equivalent statement that can be used when hte script is
>> loaded from file and executed with adonet (sqlclient) or do I have to
>> split the script file?
>>
>> Thanks
>> Patrick
>>
>