﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>StrataFrame Forum / StrataFrame Application Framework / Business Objects and Data Access (How do I?)  / SQL Notification Services / Latest Posts</title><generator>InstantForum.NET v4.1.4</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>forum@strataframe.net</webMaster><lastBuildDate>Sun, 20 Jul 2008 01:23:27 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: SQL Notification Services</title><link>http://forum.strataframe.net/Topic16006-6-1.aspx</link><description>The user to which is trying to subscribe has to have those permissions as well.  StrataFrame does everything that has to be done on the .NET side in regards to setting up the SqlDependency and then notifying you of the changes.  However, the part that you are having the issue with is more than likely the SQL side...and getting it setup.  This is one reason that we elect not to use Query notifications in the field as you can fight this issue often...so we generally take another aproach.  &lt;/P&gt;&lt;P&gt;But back to the point of the matter, to grant a subscription permission to a user you would do this:&lt;/P&gt;&lt;P&gt;GRANT SUBSCRIBE QUERY NOTIFICATIONS TO [sqldependency_user]&lt;BR&gt;</description><pubDate>Thu, 01 May 2008 19:12:07 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: SQL Notification Services</title><link>http://forum.strataframe.net/Topic16006-6-1.aspx</link><description>I have tried "SELECT " + AllFieldNames + " FROM " + TableNameAndSchema and I get the same error. I have looked at your sample and I think I am doing the same.&lt;/P&gt;&lt;P&gt;Did you have to setup or initialise SQL Notification Services itself other than the ALTER DATABASE xxxxx SET ENABLE_BROKER? My SQL Notification Services was simply installed out of the box with no post configuration beyond the intial setup.&lt;/P&gt;&lt;P&gt;I will be away for a couple of days so thanks in advance.&lt;/P&gt;&lt;P&gt;Aaron</description><pubDate>Thu, 01 May 2008 18:12:05 GMT</pubDate><dc:creator>Aaron Young</dc:creator></item><item><title>RE: SQL Notification Services</title><link>http://forum.strataframe.net/Topic16006-6-1.aspx</link><description>Sounds good.</description><pubDate>Thu, 01 May 2008 08:33:40 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: SQL Notification Services</title><link>http://forum.strataframe.net/Topic16006-6-1.aspx</link><description>Ah, I don't think I have the dbo in my query either. I am using&lt;FONT color=#a31515 size=2&gt;&lt;/P&gt;&lt;P&gt;"SELECT "&lt;/FONT&gt;&lt;FONT color=#000000 size=2&gt; + AllFieldNames + &lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;" FROM "&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;FONT color=#000000&gt; + TableName&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;and I think the latter doesn't have the dbo. I will change this and try again.</description><pubDate>Thu, 01 May 2008 05:35:19 GMT</pubDate><dc:creator>Aaron Young</dc:creator></item><item><title>RE: SQL Notification Services</title><link>http://forum.strataframe.net/Topic16006-6-1.aspx</link><description>Did you run the sample and look at some of my notes?&lt;/P&gt;&lt;P&gt;[quote]Have I done something wrong?[/quote]&lt;/P&gt;&lt;P&gt;This is a tough question to answer :)  There are a lot of "gotchas" when using Query Notifications.  You have to have properly formatted queries with explicit field names, schema names provided for tables, etc.&lt;/P&gt;&lt;P&gt;Last night when I was messing with the sample I chased my tail for a while because I left the dbo off of the Customers table in the query.  There are quite a few rules when using the SqlDependency...but I did get it working and that is why I provided the sample and some of my notes to get it to work as SQL Server is very strict when subscribing to a notification.</description><pubDate>Wed, 30 Apr 2008 19:16:08 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: SQL Notification Services</title><link>http://forum.strataframe.net/Topic16006-6-1.aspx</link><description>I have installed the latest beta and updated the base DLL but I am afraid I still get the error.&lt;/P&gt;&lt;P&gt;Have I done something wrong?&lt;/P&gt;&lt;P&gt;Thanks</description><pubDate>Wed, 30 Apr 2008 18:43:35 GMT</pubDate><dc:creator>Aaron Young</dc:creator></item><item><title>RE: SQL Notification Services</title><link>http://forum.strataframe.net/Topic16006-6-1.aspx</link><description>Two things...first, there was a bug on how the connection string was being registered.  Also, I created a sample that shows how to use this type of service.  Use the attached assembly to replace your Base that will resolve the error.  This will be in the next build that I post (I am assuming that you are on the 1.6.6 beta).  This should get you going. :)&lt;/P&gt;&lt;P&gt;Here is the sample: &lt;A href="http://forum.strataframe.net/FindPost16012.aspx"&gt;http://forum.strataframe.net/FindPost16012.aspx&lt;/A&gt;</description><pubDate>Tue, 29 Apr 2008 22:30:28 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>SQL Notification Services</title><link>http://forum.strataframe.net/Topic16006-6-1.aspx</link><description>I haven't used SQL Notification Services before so this is all new to me.&lt;/P&gt;&lt;P&gt;I have notification services installed, the broker service is enabled on the database and I have set the BO ReceiveQueryNotifications to True. When I run a form containing the BO I get the error:-&lt;/P&gt;&lt;P&gt;"When using SqlDependency without providing an options value, SqlDependency.Start() must be called prior to execution of a command added to the SqlDependency instance"&lt;/P&gt;&lt;P&gt;I have done nothing in SQL Notification Services itself as I have assumed SF handles this for me. Are there any additional steps I have missed in Notification Services itself?&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;&lt;P&gt;Aaron</description><pubDate>Tue, 29 Apr 2008 16:52:33 GMT</pubDate><dc:creator>Aaron Young</dc:creator></item></channel></rss>