<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://sqlserver.ro/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Intrebari generale</title><link>http://sqlserver.ro/forums/16/ShowForum.aspx</link><description /><dc:language>en</dc:language><generator>CommunityServer 2.1 SP2 (Build: 61129.1)</generator><item><title>Re: SQL Express Trigger</title><link>http://sqlserver.ro/forums/thread/6689.aspx</link><pubDate>Wed, 04 Feb 2009 07:09:46 GMT</pubDate><guid isPermaLink="false">963f3a18-65dd-4aad-905c-b785cfe1d7c7:6689</guid><dc:creator>crestinul</dc:creator><slash:comments>0</slash:comments><comments>http://sqlserver.ro/forums/thread/6689.aspx</comments><wfw:commentRss>http://sqlserver.ro/forums/commentrss.aspx?SectionID=16&amp;PostID=6689</wfw:commentRss><description>&lt;P&gt;Mesajul se va trimite tutoror conexiunilor ce apeleaza acest trigger.&lt;/P&gt;
&lt;P&gt;Pentru ca pe client sa beneficiezi de evenimentul de notificare trebuie sa folosesti ca provider de date sqlclient pt a avea acces la noile facilitatile ale sql2005,in speta la acel eveniment de notificare pentru mesajele de informare vizavi de conexiunea curenta&lt;/P&gt;
&lt;P&gt;E important ce metoda de acces la date folosesti din aplicatia ta,fiind vfp inclin sa crd ca folosesti odbc sau cel mult oledb.Din oledb poti folosi ca si provider de acces la date sqlclient ,nu stiu cum e din odbc ...&lt;/P&gt;</description></item><item><title>Re: SQL Express Trigger</title><link>http://sqlserver.ro/forums/thread/6686.aspx</link><pubDate>Tue, 03 Feb 2009 19:33:21 GMT</pubDate><guid isPermaLink="false">963f3a18-65dd-4aad-905c-b785cfe1d7c7:6686</guid><dc:creator>tomcat29</dc:creator><slash:comments>0</slash:comments><comments>http://sqlserver.ro/forums/thread/6686.aspx</comments><wfw:commentRss>http://sqlserver.ro/forums/commentrss.aspx?SectionID=16&amp;PostID=6686</wfw:commentRss><description>&lt;P&gt;&lt;STRONG&gt;Pentru domnul&amp;nbsp; &lt;/STRONG&gt;&lt;A href="http://sqlserver.ro/members/liviu.costea.aspx"&gt;&lt;STRONG&gt;liviu.costea&lt;/STRONG&gt;&lt;/A&gt;&lt;STRONG&gt;&amp;nbsp;:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;Precizez ca sint la inceput cu SQL Server si nu stiu sa creez coada despre care vorbiti.Eu doar am executat&amp;nbsp;scriptul.Acesta a fost executat cu succes, iar la apelarea functiei: &lt;FONT color=#008000&gt;EXEC uspMSMQSend 'lap101\private$\iris_anls_order', '&amp;lt;MESSAGE&amp;gt;Mr. Watson, come here, I need you&amp;lt;/MESSAGE&amp;gt;' primesc eroarea de mai sus.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;Cum pot sa creez coada ?&lt;/FONT&gt;&lt;/P&gt;&lt;FONT color=#008000&gt;
&lt;P&gt;&lt;STRONG&gt;Pentru domnul&amp;nbsp; &lt;/STRONG&gt;&lt;A href="http://sqlserver.ro/members/crestinul.aspx"&gt;&lt;STRONG&gt;crestinul&lt;/STRONG&gt;&lt;/A&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;:&lt;/STRONG&gt;&lt;/P&gt;&lt;FONT color=#800000 size=2&gt;
&lt;P&gt;&lt;FONT color=#000000&gt;sp_addmessage&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#000000&gt;&lt;FONT size=2&gt; @msgnum&lt;/FONT&gt;&lt;FONT size=2&gt;=&lt;/FONT&gt;&lt;FONT size=2&gt;70000&lt;/FONT&gt;&lt;FONT size=2&gt;,&lt;/FONT&gt;&lt;FONT size=2&gt;@severity&lt;/FONT&gt;&lt;FONT size=2&gt;=&lt;/FONT&gt;&lt;FONT size=2&gt;10&lt;/FONT&gt;&lt;FONT size=2&gt;,&lt;/FONT&gt;&lt;FONT size=2&gt;@msgtext&lt;/FONT&gt;&lt;FONT size=2&gt;=&lt;/FONT&gt;&lt;FONT size=2&gt;'mesaj client '&lt;/FONT&gt;&lt;FONT size=2&gt;,&lt;/FONT&gt;&lt;FONT size=2&gt;@replace &lt;/FONT&gt;&lt;FONT size=2&gt;=&lt;/FONT&gt;&lt;FONT size=2&gt;'replace'&lt;/P&gt;&lt;/FONT&gt;&lt;/FONT&gt;
&lt;P&gt;Acum triggerul meu arata asa :&lt;/P&gt;&lt;FONT color=#0000ff&gt;
&lt;ADDRESS&gt;USE&lt;/FONT&gt;&lt;FONT color=#000000&gt; DB1&lt;/FONT&gt;&lt;FONT color=#808080&gt;;&lt;/ADDRESS&gt;&lt;/FONT&gt;
&lt;ADDRESS&gt;GO&lt;/ADDRESS&gt;&lt;FONT color=#0000ff&gt;
&lt;ADDRESS&gt;CREATE&lt;/FONT&gt;&lt;FONT color=#000000&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff&gt;TRIGGER&lt;/FONT&gt;&lt;FONT color=#000000&gt; modifica_stoc &lt;/FONT&gt;&lt;FONT color=#0000ff&gt;ON&lt;/FONT&gt;&lt;FONT color=#000000&gt; MyStocDB&lt;/FONT&gt;&lt;/ADDRESS&gt;&lt;FONT color=#0000ff&gt;
&lt;ADDRESS&gt;AFTER&lt;/FONT&gt;&lt;FONT color=#000000&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff&gt;INSERT&lt;/ADDRESS&gt;
&lt;ADDRESS&gt;AS&lt;/ADDRESS&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;
&lt;ADDRESS&gt;DECLARE&lt;/FONT&gt;&lt;FONT color=#000000&gt; @msgtext &lt;/FONT&gt;&lt;FONT color=#0000ff&gt;nvarchar&lt;/FONT&gt;&lt;FONT color=#808080&gt;(&lt;/FONT&gt;&lt;FONT color=#000000&gt;1024&lt;/FONT&gt;&lt;FONT color=#808080&gt;)&lt;/ADDRESS&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;
&lt;ADDRESS&gt;&lt;FONT color=#0000ff&gt;raiserror&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#808080&gt;(&lt;/FONT&gt;&lt;FONT color=#000000&gt;70000&lt;/FONT&gt;&lt;FONT color=#808080&gt;,&lt;/FONT&gt;&lt;FONT color=#000000&gt;@msgtext&lt;/FONT&gt;&lt;FONT color=#808080&gt;,&lt;/FONT&gt;&lt;FONT color=#000000&gt;10&lt;/FONT&gt;&lt;FONT color=#808080&gt;,&lt;/FONT&gt;&lt;FONT color=#000000&gt;1&lt;/FONT&gt;&lt;FONT color=#808080&gt;)&lt;/FONT&gt;&lt;FONT color=#000000&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff&gt;with&lt;/FONT&gt;&lt;FONT color=#000000&gt; &lt;/FONT&gt;&lt;FONT color=#ff00ff&gt;log&lt;/FONT&gt;&lt;FONT color=#000000&gt; &lt;/FONT&gt;&lt;/ADDRESS&gt;
&lt;ADDRESS&gt;GO&lt;/ADDRESS&gt;
&lt;ADDRESS&gt;&amp;nbsp;&lt;/ADDRESS&gt;
&lt;P&gt;Cind execut comanda : &lt;FONT color=#0000ff&gt;&lt;/P&gt;
&lt;P&gt;insert&lt;/FONT&gt;&lt;FONT color=#000000&gt; MyStocDB&lt;/FONT&gt;&lt;FONT color=#808080&gt;(&lt;/FONT&gt;&lt;FONT color=#000000&gt;column_stoc&lt;/FONT&gt;&lt;FONT color=#808080&gt;)&lt;/FONT&gt;&lt;FONT color=#000000&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff&gt;Values&lt;/FONT&gt;&lt;FONT color=#000000&gt; &lt;/FONT&gt;&lt;FONT color=#808080&gt;(&lt;/FONT&gt;&lt;FONT color=#ff0000&gt;'55&lt;/FONT&gt;&lt;FONT color=#ff0000&gt;'&lt;/FONT&gt;&lt;FONT color=#808080&gt;)&amp;nbsp; &lt;/FONT&gt;&lt;FONT color=#000000&gt;primesc intr-adevar mesajul "mesaj client" si "(1 row(s) affected)".&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT&gt;&lt;FONT color=#000000&gt;Ma intreb daca totusi este corect si acel mesaj se trimite la toate PC-urile din retea (desi nu cred ca se trimite) sau trebuie sa mai fac ceva....&lt;/FONT&gt;&lt;/P&gt;&lt;/FONT&gt;
&lt;P&gt;&lt;FONT color=#000000&gt;Daca se poate va mai cer putin ajutor pentru a rezolva aceasta problema. Va multumesc !&lt;/FONT&gt;&lt;/P&gt;
&lt;ADDRESS&gt;&lt;FONT color=#000000&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/ADDRESS&gt;&lt;/FONT&gt;</description></item><item><title>Re: SQL Express Trigger</title><link>http://sqlserver.ro/forums/thread/6681.aspx</link><pubDate>Tue, 03 Feb 2009 16:51:21 GMT</pubDate><guid isPermaLink="false">963f3a18-65dd-4aad-905c-b785cfe1d7c7:6681</guid><dc:creator>crestinul</dc:creator><slash:comments>0</slash:comments><comments>http://sqlserver.ro/forums/thread/6681.aspx</comments><wfw:commentRss>http://sqlserver.ro/forums/commentrss.aspx?SectionID=16&amp;PostID=6681</wfw:commentRss><description>&lt;P&gt;O alta varianta ar fi sa trimiti un mesaj de informare catre client.&lt;/P&gt;
&lt;P&gt;Poti face astfel&lt;/P&gt;
&lt;P&gt;1) Iti definesti propriul mesaj de informar folosind sp_addmessage&lt;/P&gt;
&lt;P&gt;de ex sp_addmessage @msgnum=7000,@severiy=10,@msgtext='mesaj client'&lt;/P&gt;
&lt;P&gt;In trigger in loc de select pui raiseerror(7000,--messageid,10--severity tb sa fie pana in zece mesaj de infoirmare nu eroare,1--state)&lt;/P&gt;
&lt;P&gt;depinde de ce metoda/provider de acces la date folosesti tu pe client pentru a receptiona/,anevra acest ,esaj.&lt;/P&gt;
&lt;P&gt;In ado.net folosind sqlclient provider obiectul sqlconnection are handlerul de eveniment.l InfoMessage .&lt;/P&gt;
&lt;P&gt;Nu stiu cum se face in vfp acces la date din ce imi aduc eu aminte era remote view dar care are in spate odbc nu sqlprovider&lt;/P&gt;</description></item><item><title>Re: SQL Express Trigger</title><link>http://sqlserver.ro/forums/thread/6680.aspx</link><pubDate>Tue, 03 Feb 2009 13:56:25 GMT</pubDate><guid isPermaLink="false">963f3a18-65dd-4aad-905c-b785cfe1d7c7:6680</guid><dc:creator>liviu.costea</dc:creator><slash:comments>0</slash:comments><comments>http://sqlserver.ro/forums/thread/6680.aspx</comments><wfw:commentRss>http://sqlserver.ro/forums/commentrss.aspx?SectionID=16&amp;PostID=6680</wfw:commentRss><description>&lt;P&gt;Se pare ca nu ai creat coada, sau nu are acelasi nume cu cea apelata din sql server.&lt;/P&gt;
&lt;P&gt;Verifica asta si spune-mi rezultatul.&lt;/P&gt;</description></item><item><title>Re: SQL Express Trigger</title><link>http://sqlserver.ro/forums/thread/6670.aspx</link><pubDate>Mon, 02 Feb 2009 20:07:33 GMT</pubDate><guid isPermaLink="false">963f3a18-65dd-4aad-905c-b785cfe1d7c7:6670</guid><dc:creator>tomcat29</dc:creator><slash:comments>0</slash:comments><comments>http://sqlserver.ro/forums/thread/6670.aspx</comments><wfw:commentRss>http://sqlserver.ro/forums/commentrss.aspx?SectionID=16&amp;PostID=6670</wfw:commentRss><description>&lt;P&gt;Va multumesc tuturor pentru raspunsuri !&lt;/P&gt;
&lt;P&gt;Incerc sa folosesc MSMQ pentru a trimite mesaje.Am gasit aici : &lt;A href="http://www.codeproject.com/KB/database/SqlMSMQ.aspx"&gt;http://www.codeproject.com/KB/database/SqlMSMQ.aspx&lt;/A&gt;&amp;nbsp;un exemplu interesant. Am facut cred ca tot ce scria acolo (de fapt am executat scriptul,am schimbat numele bazei de date si calea catre SqlMSMQ.dll).Scriptul se executa corect,dar cind incerc sa execut functia uspMSMQSend primesc urmatoarul mesaj de eroare :&lt;/P&gt;
&lt;P&gt;Msg 6522, Level 16, State 1, Procedure uspMSMQSend, Line 0&lt;BR&gt;A .NET Framework error occurred during execution of user-defined routine or aggregate "uspMSMQSend": &lt;BR&gt;System.Messaging.MessageQueueException: Invalid queue path name.&lt;BR&gt;System.Messaging.MessageQueueException: &lt;BR&gt;at System.Messaging.MessageQueue.ResolveFormatNameFromQueuePath(String queuePath, Boolean throwException)&lt;BR&gt;at System.Messaging.MessageQueue.get_FormatName()&lt;BR&gt;at System.Messaging.MessageQueue.SendInternal(Object obj, MessageQueueTransaction internalTransaction, MessageQueueTransactionType transactionType)&lt;BR&gt;at System.Messaging.MessageQueue.Send(Object obj)&lt;BR&gt;at WJeziorczak.Sql.SqlMSMQ.Send(SqlString queue, SqlString msg)&lt;BR&gt;&lt;/P&gt;
&lt;P&gt;Ma poate ajuta cineva ?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description></item><item><title>Re: SQL Express Trigger</title><link>http://sqlserver.ro/forums/thread/6662.aspx</link><pubDate>Mon, 02 Feb 2009 08:07:49 GMT</pubDate><guid isPermaLink="false">963f3a18-65dd-4aad-905c-b785cfe1d7c7:6662</guid><dc:creator>B_gd_n[ ]Sahlean</dc:creator><slash:comments>0</slash:comments><comments>http://sqlserver.ro/forums/thread/6662.aspx</comments><wfw:commentRss>http://sqlserver.ro/forums/commentrss.aspx?SectionID=16&amp;PostID=6662</wfw:commentRss><description>Ceva idei &amp;gt; &lt;a href="http://stackoverflow.com/questions/305637/send-message-from-sql-server-trigger"&gt;http://stackoverflow.com/questions/305637/send-message-from-sql-server-trigger&lt;/a&gt; !&lt;br&gt;</description></item><item><title>Re: SQL Express Trigger</title><link>http://sqlserver.ro/forums/thread/6661.aspx</link><pubDate>Mon, 02 Feb 2009 07:58:27 GMT</pubDate><guid isPermaLink="false">963f3a18-65dd-4aad-905c-b785cfe1d7c7:6661</guid><dc:creator>ignatandrei</dc:creator><slash:comments>0</slash:comments><comments>http://sqlserver.ro/forums/thread/6661.aspx</comments><wfw:commentRss>http://sqlserver.ro/forums/commentrss.aspx?SectionID=16&amp;PostID=6661</wfw:commentRss><description>&lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;img src="http://sqlserver.ro/Themes/default/images/icon-quote.gif"&gt; &lt;strong&gt;tomcat29:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Forum_Normal" id="spBody"&gt;&amp;nbsp;Salut.&lt;p&gt;Am si o tabela in care memorez IP-ul fiecarui user care foloseste aplicatia mea facuta in VFP.&lt;/p&gt;
&lt;p&gt;Cum pot sa trimit tuturor user-ilor acest mesaj ? Vreau ca pe statiile din retea sa captez cumva acest mesaj .&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/BLOCKQUOTE&gt;&lt;br&gt;Mesajul respectiv il poti pune intr-o tabela, cu data respectiva.&lt;br&gt;La x minute aplicatia ta in VFP se conecteaza la tabela ( nu stiu daca exista thread in VFP, dar ar fi bun...) si vede daca data ultimului mesaj &amp;gt; data din memoria aplicatiei. Daca da,  data din memoria aplicatiei = data ultimului mesaj si afiseaza mesajul ...&lt;br&gt;</description></item><item><title>Re: SQL Express Trigger</title><link>http://sqlserver.ro/forums/thread/6660.aspx</link><pubDate>Mon, 02 Feb 2009 07:52:32 GMT</pubDate><guid isPermaLink="false">963f3a18-65dd-4aad-905c-b785cfe1d7c7:6660</guid><dc:creator>katalyn</dc:creator><slash:comments>0</slash:comments><comments>http://sqlserver.ro/forums/thread/6660.aspx</comments><wfw:commentRss>http://sqlserver.ro/forums/commentrss.aspx?SectionID=16&amp;PostID=6660</wfw:commentRss><description>Eu aş avea vre-o 2 idei. Prima ar fi (aşa cum aş proceda eu) să folosesc o procedura stocata care să realizeze insert-ul şi dacă acesta este realizat cu succes, procedura să intoarcă mesajul respectiv către aplicaţia client.&lt;br&gt;&lt;br&gt;begin try&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; codul din procedura (insert-ul)&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; select 'S-a modificat stocul'&lt;br&gt;end try&lt;br&gt;begin catch&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; select 'Eroare, stocul nu a putut fi modificat !'&lt;br&gt;end catch&lt;br&gt;&lt;br&gt;O a 2-a metodă la care mă gândesc ar fi cu service broker dar cred că prima este mai bună.&lt;br&gt;</description></item><item><title>SQL Express Trigger</title><link>http://sqlserver.ro/forums/thread/6659.aspx</link><pubDate>Sun, 01 Feb 2009 18:41:06 GMT</pubDate><guid isPermaLink="false">963f3a18-65dd-4aad-905c-b785cfe1d7c7:6659</guid><dc:creator>tomcat29</dc:creator><slash:comments>0</slash:comments><comments>http://sqlserver.ro/forums/thread/6659.aspx</comments><wfw:commentRss>http://sqlserver.ro/forums/commentrss.aspx?SectionID=16&amp;PostID=6659</wfw:commentRss><description>&lt;SPAN class=Forum_Normal id=spBody&gt;&amp;nbsp;Salut.
&lt;P&gt;Am facut un trigger pe SSX.&lt;/P&gt;
&lt;ADDRESS&gt;USE DB1;&lt;/ADDRESS&gt;
&lt;ADDRESS&gt;GO&lt;/ADDRESS&gt;
&lt;ADDRESS&gt;CREATE TRIGGER&amp;nbsp;modifica_stoc ON MyStocDB&lt;/ADDRESS&gt;
&lt;ADDRESS&gt;AFTER UPDATE&lt;/ADDRESS&gt;
&lt;ADDRESS&gt;AS&lt;/ADDRESS&gt;
&lt;ADDRESS&gt;print 'S-a modificat stocul'&lt;/ADDRESS&gt;
&lt;ADDRESS&gt;GO&lt;/ADDRESS&gt;
&lt;ADDRESS&gt;&amp;nbsp;&lt;/ADDRESS&gt;
&lt;P&gt;Am si o tabela in care memorez IP-ul fiecarui user care foloseste aplicatia mea facuta in VFP.&lt;/P&gt;
&lt;P&gt;Cum pot sa trimit tuturor user-ilor acest mesaj ? Vreau ca pe statiile din retea sa captez cumva acest mesaj .&lt;/P&gt;
&lt;P&gt;Va rog sa nu imi spuneti de net send si de dll-ul de la &lt;A href="http://www.atvsoftware.com"&gt;www.atvsoftware.com&lt;/A&gt;&amp;nbsp;pentru ca sint nefolositoare deoarece nu functioneaza in retele cu routere.&lt;/P&gt;
&lt;P&gt;Ma puteti ajuta ?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;ADDRESS&gt;&amp;nbsp;&lt;/ADDRESS&gt;&lt;/SPAN&gt;</description></item></channel></rss>