Hi.
Maybe a long shot here but i wonder is it possible add a trigger to a
table that will send some of the data used on the trigger in an Xml
file via http?
Any suggestions?
Cheers
JoPlease note I m using MS Sql 2000
On Mar 21, 2:50 pm, "Jo" <jodiep...@.gmail.com> wrote:
> Hi.
> Maybe a long shot here but i wonder is it possible add a trigger to a
> table that will send some of the data used on the trigger in an Xml
> file via http?
> Any suggestions?
> Cheers
> Jo|||Sending data directly from a trigger is probably a pretty bad idea because
whatever transaction caused the trigger to fire will be delay for however
long it takes to send the data which usually doesn't make your users happy.
In SQL Server 2005 I would recommend you use a FOR XML TYPE query to convert
the trigger data into XML but that isn't there in SQL 2000. Your best
option is probably to have the trigger write whatever data you need to send
to a table and then write an external program that periodically reads this
table, converts the dataset into XML, and sends the data.
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
"Jo" <jodiepool@.gmail.com> wrote in message
news:1174488721.558362.98930@.d57g2000hsg.googlegroups.com...
> Please note I m using MS Sql 2000
> On Mar 21, 2:50 pm, "Jo" <jodiep...@.gmail.com> wrote:
>|||Actually, SQL 2000 has "FOR XML" -- I use this all the time to return =
XML data fom a SPROC, though I don't know about triggers like Jo asked =
about.
Jo, what is your purpose for wanting to send XML over HTTP from a =
trigger? What are you trying to accomplish?
--=20
Greg Collins [Microsoft MVP]
Visit Braintrove ( http://www.braintrove.com )|||True but you can't use SQL 2000 FOR XML in a trigger - the XML is generated
in the OLEDB driver.
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
"Greg Collins [Microsoft MVP]" <gcollins_AT_msn_DOT_com> wrote in message
news:eJKHPfNbHHA.4552@.TK2MSFTNGP05.phx.gbl...
Actually, SQL 2000 has "FOR XML" -- I use this all the time to return XML
data fom a SPROC, though I don't know about triggers like Jo asked about.
Jo, what is your purpose for wanting to send XML over HTTP from a trigger?
What are you trying to accomplish?
Greg Collins [Microsoft MVP]
Visit Braintrove ( http://www.braintrove.com )
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment