Saturday, February 25, 2012

Multiple Batches via ADO

Hi,
how would I go about sending a Update Script (with multiples Batches) via
ADO to an SQL 2000 Server.
As much as I know the Command.CommandText can only take a single query.
Thanks a lot
PatrickHi Patrick
You can try using UpdateBatch option available in ADO
thanks and regards
Chandra
"Patrick Wolf" wrote:

> Hi,
> how would I go about sending a Update Script (with multiples Batches) via
> ADO to an SQL 2000 Server.
> As much as I know the Command.CommandText can only take a single query.
> Thanks a lot
> Patrick
>
>|||Hi Chandra,
thanks but this is to batch update a recordset. Eg. if you make multiple
updates in a recordset it enables you to post them all at once.
It doesnt allow you to pass in a script.
Thanks
Patrick
"Chandra" <Chandra@.discussions.microsoft.com> wrote in message
news:F00BB8E6-3D0F-46E1-9111-95F68AE3CF88@.microsoft.com...
> Hi Patrick
> You can try using UpdateBatch option available in ADO
> thanks and regards
> Chandra
>
> "Patrick Wolf" wrote:
>|||Hi Patrick
You can try executing the different scripts in a loop or u can send multiple
queries saperated by a semi colon.
Command.CommandText "query1;query2;query3"
thanks and regards
Chandra
"Patrick Wolf" wrote:

> Hi Chandra,
> thanks but this is to batch update a recordset. Eg. if you make multiple
> updates in a recordset it enables you to post them all at once.
> It doesnt allow you to pass in a script.
> Thanks
> Patrick
> "Chandra" <Chandra@.discussions.microsoft.com> wrote in message
> news:F00BB8E6-3D0F-46E1-9111-95F68AE3CF88@.microsoft.com...
>
>|||The simplest way to accomplish this is to build a large string with all of t
he
statements you wish to execute and execute the statement. Anything you write
in
QA, you can execute this way.
Thomas
"Patrick Wolf" <ppjwolf@.bigfoot.com> wrote in message
news:On4RWZsTFHA.3184@.TK2MSFTNGP15.phx.gbl...
> Hi,
> how would I go about sending a Update Script (with multiples Batches) via
ADO
> to an SQL 2000 Server.
> As much as I know the Command.CommandText can only take a single query.
> Thanks a lot
> Patrick
>|||Hi Thomas,
that is the answer I was looking for thanks.
I did't know that this would be possible.
I will try it out.
Good wishes
Patrick
"Thomas Coleman" <thomas@.newsgroup.nospam> wrote in message
news:OLKhkLyTFHA.2768@.tk2msftngp13.phx.gbl...
> The simplest way to accomplish this is to build a large string with all of
> the statements you wish to execute and execute the statement. Anything you
> write in QA, you can execute this way.
>
> Thomas
>
> "Patrick Wolf" <ppjwolf@.bigfoot.com> wrote in message
> news:On4RWZsTFHA.3184@.TK2MSFTNGP15.phx.gbl...
>

No comments:

Post a Comment