Wednesday, March 7, 2012

Run a stored proc using vbscript

I understand that it may not be a good thing to use an ADO execute statement
using VBscript to update a SQL database. Rather the preferred method is to
execute a stored procedure. How does one do this using VBscript, and how
would you confirm that the update took place properly ?
Thanks !Hi,
You will receive an error by Errors collection on connection object.
Tomasz B.
"Rob C" wrote:

> I understand that it may not be a good thing to use an ADO execute stateme
nt
> using VBscript to update a SQL database. Rather the preferred method is
to
> execute a stored procedure. How does one do this using VBscript, and how
> would you confirm that the update took place properly ?
> Thanks !
>
>|||How To Invoke a Stored Procedure with ADO Query Using VBA/C++/Java
http://support.microsoft.com/?kbid=185125
AMB
"Rob C" wrote:

> I understand that it may not be a good thing to use an ADO execute stateme
nt
> using VBscript to update a SQL database. Rather the preferred method is
to
> execute a stored procedure. How does one do this using VBscript, and how
> would you confirm that the update took place properly ?
> Thanks !
>
>|||Rob C wrote:
> I understand that it may not be a good thing to use an ADO execute
> statement using VBscript to update a SQL database. Rather the
> preferred method is to execute a stored procedure. How does one do
> this using VBscript, and how would you confirm that the update took
> place properly ?
> Thanks !
This was written with ASP in mind. Remove "Server." from the createobject
statements to make it relevant to straight vbscript :
http://groups.google.com/groups?hl=...FTNGP12.phx.gbl
As somebody else stated, errors will be returned to the connection's errors
collection (the first error in the collection will usually bubble up to the
vbscript error-handler as well)
Bob Barrows
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.

No comments:

Post a Comment