You are here: Re: Nested Nodes in XML from a table « MsSQL Server « IT news, forums, messages
Re: Nested Nodes in XML from a table

Posted by Erland Sommarskog on 11/18/60 11:34

coosa (coosa76@gmail.com) writes:
> Thanks Erland, it works now.
> I'm facing now another Issue :-D
> Now in asp.net I have created a streamfile and gave it a .xml
> extension, added the missing XML declaration line, SQL Server didn't
> provide, and every thing works fine, so far, but the whole purpose of
> doing of this was to increase the performance of the server; the
> concept was as follows:
>
> I don't want every time a client openes the page to access and process
> queries from SQL Server, but i rather create XML file and read from it
> to display the categories AS LONG the categories in the DB have not
> been changed; if changed then for one time, the XML file gets updated
> and so on.
> So I'd like to create a trigger that would perform the following:
> Execute .exe File located in a known path for SQL server
>
> This .exe is a compiled .net code that would automatically query the
> XML results and update the XML file file.
>
> Is it possible to do some thing like this with a trigger?

Possible? Yes, if the SQL Server machine can access the disk where the
file is. But, no, go there. A trigger is part of transaction, and should
leave as little footprint as possible. Running around and updating files
on a client is a poor idea.

Rather, I would suggest that you look into query notification. You can
submit a query, and then specify that you want to be notified when the
query changes. This requires SQL 2005 and ADO .Net 2.0. I'm not going
to show any examples here, but please look in Books Online.

I will have to admit that I not entirely convinced that this is a good
idea. I would probably get the XML from the database each time. But
that's your call.


--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация