<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Forward</title>
	<atom:link href="http://brianbruijn.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://brianbruijn.wordpress.com</link>
	<description>making fun out of craziness</description>
	<pubDate>Thu, 26 Jun 2008 22:01:31 +0000</pubDate>
	<generator>http://wordpress.org/?v=MU</generator>
	<language>en</language>
			<item>
		<title>Using record data with SQL statements in SQL with no outside programming used!</title>
		<link>http://brianbruijn.wordpress.com/2008/06/24/using-record-data-with-sql-statements-in-sql-with-no-outside-programming-used/</link>
		<comments>http://brianbruijn.wordpress.com/2008/06/24/using-record-data-with-sql-statements-in-sql-with-no-outside-programming-used/#comments</comments>
		<pubDate>Tue, 24 Jun 2008 20:46:15 +0000</pubDate>
		<dc:creator>tszao</dc:creator>
		
		<category><![CDATA[SQL Server]]></category>

		<category><![CDATA[database]]></category>

		<category><![CDATA[sql]]></category>

		<category><![CDATA[tips]]></category>

		<category><![CDATA[SSMS]]></category>

		<category><![CDATA[sql server 2005]]></category>

		<category><![CDATA[sql programming]]></category>

		<category><![CDATA[temp tables]]></category>

		<category><![CDATA[variables]]></category>

		<guid isPermaLink="false">http://brianbruijn.wordpress.com/?p=62</guid>
		<description><![CDATA[So this is freaking great!!! I finally learned how to manipulate data by pulling bits and pieces out of a sql statement to use in other SQL statements. Please note that I have not tried this in SQL Server 2000 but it sure works great in SQL Server 2005 and up.
Let&#8217;s say that you want [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>So this is freaking great!!! I finally learned how to manipulate data by pulling bits and pieces out of a sql statement to use in other SQL statements. Please note that I have not tried this in SQL Server 2000 but it sure works great in SQL Server 2005 and up.</p>
<p>Let&#8217;s say that you want to add a column to a table and then populate it with data that is in the table already. (I know redundant data, however the thought at work is that it is primer data that the end user can change as opposed to a locked value that they can do nothing with.)</p>
<p>This script is going to be used in an upgrade to an existing application. So if the change has already happened we want to by pass this in lieu of the current data that is in the system.</p>
<p>First you want to check to see of your field exists and if it does not add it.</p>
<pre>IF not exists (select * from sys.columns where [object_id] = (</pre>
<pre>Select [object_id] from sys.tables st JOIN sys.schemas ss ON st.schema_id = ss.schema_id where st.name = 'table_name')</pre>
<pre>AND name = 'new_field_name')</pre>
<pre>BEGIN</pre>
<pre>ALTER TABLE [dbo].[table_name] ADD [new_field_name] [char](12) NULL</pre>
<pre>END</pre>
<pre>GO</pre>
<p>Because my in house example will create temporary tables I want to check if the temp tables exist and if so drop them</p>
<pre>IF  EXISTS (SELECT name FROM tempdb..sysobjects WHERE name like '#Temp%')</pre>
<pre>drop table #Temp</pre>
<pre>GO</pre>
<pre>IF  EXISTS (SELECT name FROM tempdb..sysobjects WHERE name like '#Temp2%')</pre>
<pre>drop table #Temp2</pre>
<pre>GO</pre>
<p>Note the &#8216;%&#8217; in my statements above. It is necessary because Microsoft adds a lot of junk to the end of the temp table.</p>
<p>I know the following can go several different ways. So, I am giving you the quick and dirty how to. The next thing I did was set a declaration that will be used to pull the count total out for use later in the conditional logic.</p>
<pre>Declare @t_intTotal Int</pre>
<pre>SELECT @t_intTotal=count(unique_field_name) FROM table_name WHERE new_field_name is not null</pre>
<pre>print @t_intTotal</pre>
<p>With normal queries we are able to set the count(unique_field_name) as intCountFieldName and use the as variable from our recordset. Not so from within SQL server. To use the data from count(unique_field_name) I had to set @t_intTotal = count(unique_field_name). This makes it available later on in the process.</p>
<p>Next we have to declare some more variables that will be used if all of our new field_name fields are null. (Again, think quick and dirty. Feel free to clean it up if you like.)</p>
<pre>Declare @Count Int</pre>
<pre>Declare @LoopCount Int</pre>
<pre>Declare @populate_value char(3)</pre>
<pre>Declare @t_populate_value char(3)</pre>
<p>Using the new @t_intTotal variable we are able to write a simple if statement and run some code if it is necessary. After the first check we have our first of 2 temp tables. The data from here will be used to create the second temp table with an identity added to it.</p>
<pre>IF @t_intTotal = 0</pre>
<pre>Select unique_field_name -- also the seed data value</pre>
<pre>into   #Temp</pre>
<pre>from  table_name</pre>
<p>Using the first temp table we add the identity to a second temp table. This gives us a unique key that we can loop over when trying to add data to the table that already exists. We will set the Count to the total rows from the new query and set loop count to start at 1. Note if you pull an identity field in as one of your variables you cannot do the Identity(int,1,1) id. Only one identity field per table.</p>
<pre>IF @t_intTotal = 0</pre>
<pre>Select Identity(int,1,1) ID, unique_field_name into #Temp2 from #Temp</pre>
<pre>Set @Count = @@RowCount</pre>
<pre>Set @LoopCount = 1</pre>
<p>Using the second temp table we are able to loop over the recordset making an update with each iteration. In my case it is important to note that unique_field_name is a unique record so that we can use it to make sure the right seed data is going into the correct column.</p>
<pre>IF @t_intTotal = 0</pre>
<pre>While @LoopCount &lt;= @Count</pre>
<pre>Begin</pre>
<pre>Select @t_populatevalue=unique_field_name  from #Temp2 Where ID = @LoopCount</pre>
<pre>Set @LoopCount = @LoopCount + 1</pre>
<pre>update table_name</pre>
<pre>set new_field_name = @t_populate_value</pre>
<pre>where unique_field_name = @t_populate_value</pre>
<pre>End</pre>
<pre>GO</pre>
<p>Note that I had to add unique_field_name data as the seed data in the new_field_name column.</p>
<p>This may be old hat for some, but when searching the web it is near impossible to find all of this in one place. I hope that you enjoy it and can mod it for your use. Let me know what you think.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/brianbruijn.wordpress.com/62/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/brianbruijn.wordpress.com/62/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/brianbruijn.wordpress.com/62/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/brianbruijn.wordpress.com/62/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/brianbruijn.wordpress.com/62/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/brianbruijn.wordpress.com/62/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/brianbruijn.wordpress.com/62/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/brianbruijn.wordpress.com/62/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/brianbruijn.wordpress.com/62/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/brianbruijn.wordpress.com/62/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/brianbruijn.wordpress.com/62/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/brianbruijn.wordpress.com/62/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=brianbruijn.wordpress.com&blog=1544312&post=62&subd=brianbruijn&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://brianbruijn.wordpress.com/2008/06/24/using-record-data-with-sql-statements-in-sql-with-no-outside-programming-used/feed/</wfw:commentRss>
	
		<media:content url="http://a.wordpress.com/avatar/tszao-128.jpg" medium="image">
			<media:title type="html">tszao</media:title>
		</media:content>
	</item>
		<item>
		<title>Changing the snapshot directory for SQL Server 2005 Merge and Replication</title>
		<link>http://brianbruijn.wordpress.com/2008/06/13/changing-the-snapshot-directory-for-sql-server-2005-merge-and-replication/</link>
		<comments>http://brianbruijn.wordpress.com/2008/06/13/changing-the-snapshot-directory-for-sql-server-2005-merge-and-replication/#comments</comments>
		<pubDate>Fri, 13 Jun 2008 15:20:12 +0000</pubDate>
		<dc:creator>tszao</dc:creator>
		
		<category><![CDATA[Microsoft]]></category>

		<category><![CDATA[SQL Server]]></category>

		<category><![CDATA[database]]></category>

		<category><![CDATA[tips]]></category>

		<category><![CDATA[merge and replication]]></category>

		<category><![CDATA[snapshot]]></category>

		<category><![CDATA[sql]]></category>

		<category><![CDATA[sql server 2005]]></category>

		<category><![CDATA[stored procedure]]></category>

		<guid isPermaLink="false">http://brianbruijn.wordpress.com/?p=60</guid>
		<description><![CDATA[So, I was debugging some merge and replication issues for SQL Server 2005 yesterday with a co-worker and we realized that we pointed the snapshot to the wrong directory. Everything else was created properly and the only thing that wasn’t working was the snapshot generator.
When one generates the scripting for creating a publication there are [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>So, I was debugging some merge and replication issues for SQL Server 2005 yesterday with a co-worker and we realized that we pointed the snapshot to the wrong directory. Everything else was created properly and the only thing that wasn’t working was the snapshot generator.</p>
<p>When one generates the scripting for creating a publication there are stored procedures that assign the snapshot directory to the distribution.</p>
<p>sp_updateextendedproperty<br />
sp_addextendedproperty</p>
<p>I thought, sure that is what I will use to get it working in the correct directory.  All I have to do is use the sp_updateextendedproperty and reset the path. Well, that didn’t work. May work for others but didn’t work for me.</p>
<p>So I had to get a little more drastic. I went digging. One of the nice things about SQL server is that everything is handled and configured in the server. After digging for a while, I found the following:</p>
<p>In the distribution database there is a stored procedure called sp_MSadd_snapshot_agent.  It points me to the msdb database. Run this query and you will see the snapshot directory.</p>
<p>SELECT * FROM msdb..MSdistpublishers</p>
<p>Now that I know where it is at, a simple update script can change it.</p>
<p>update msdb..MSdistpublishers<br />
set working_directory = &#8216;\\your new snapshot directory\&#8217;<br />
where name = &#8216;name of your publication&#8217;</p>
<p>That’s it. Subscribers can now be added and all will be well.</p>
<p>Another, quick gotcha you may run into with this involves permissions on the snapshot directory. If they are not configured properly then the snapshot will still not get generated.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/brianbruijn.wordpress.com/60/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/brianbruijn.wordpress.com/60/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/brianbruijn.wordpress.com/60/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/brianbruijn.wordpress.com/60/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/brianbruijn.wordpress.com/60/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/brianbruijn.wordpress.com/60/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/brianbruijn.wordpress.com/60/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/brianbruijn.wordpress.com/60/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/brianbruijn.wordpress.com/60/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/brianbruijn.wordpress.com/60/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/brianbruijn.wordpress.com/60/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/brianbruijn.wordpress.com/60/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=brianbruijn.wordpress.com&blog=1544312&post=60&subd=brianbruijn&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://brianbruijn.wordpress.com/2008/06/13/changing-the-snapshot-directory-for-sql-server-2005-merge-and-replication/feed/</wfw:commentRss>
	
		<media:content url="http://a.wordpress.com/avatar/tszao-128.jpg" medium="image">
			<media:title type="html">tszao</media:title>
		</media:content>
	</item>
		<item>
		<title>Ruby on rails 2.0 blog in 15 minutes</title>
		<link>http://brianbruijn.wordpress.com/2008/06/12/ruby-on-rails-20-blog-in-15-minutes/</link>
		<comments>http://brianbruijn.wordpress.com/2008/06/12/ruby-on-rails-20-blog-in-15-minutes/#comments</comments>
		<pubDate>Thu, 12 Jun 2008 17:00:06 +0000</pubDate>
		<dc:creator>tszao</dc:creator>
		
		<category><![CDATA[agile development]]></category>

		<category><![CDATA[ruby]]></category>

		<category><![CDATA[ruby on rails]]></category>

		<category><![CDATA[tips]]></category>

		<category><![CDATA[blog]]></category>

		<category><![CDATA[dhh]]></category>

		<category><![CDATA[link]]></category>

		<category><![CDATA[rails 2.0]]></category>

		<category><![CDATA[text_field]]></category>

		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://brianbruijn.wordpress.com/?p=59</guid>
		<description><![CDATA[I was searching for a fix to some issues I had with text_field and forms and found this.
http://skionrails.wordpress.com/tutorials/how-to-write-a-blog-in-15-minutes/
It not only helped with my issue, it also updates the now famous DHH video for pre-2.0 rails.
It is very detailed and useful if you are getting started with Rails 2.0
       ]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I was searching for a fix to some issues I had with text_field and forms and found this.</p>
<p><a title="How to write a ruby on rails 2.0 blog in 15 minutes" href="http://skionrails.wordpress.com/tutorials/how-to-write-a-blog-in-15-minutes/" target="_blank">http://skionrails.wordpress.com/tutorials/how-to-write-a-blog-in-15-minutes/</a></p>
<p>It not only helped with my issue, it also updates the now famous DHH video for pre-2.0 rails.</p>
<p>It is very detailed and useful if you are getting started with Rails 2.0</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/brianbruijn.wordpress.com/59/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/brianbruijn.wordpress.com/59/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/brianbruijn.wordpress.com/59/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/brianbruijn.wordpress.com/59/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/brianbruijn.wordpress.com/59/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/brianbruijn.wordpress.com/59/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/brianbruijn.wordpress.com/59/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/brianbruijn.wordpress.com/59/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/brianbruijn.wordpress.com/59/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/brianbruijn.wordpress.com/59/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/brianbruijn.wordpress.com/59/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/brianbruijn.wordpress.com/59/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=brianbruijn.wordpress.com&blog=1544312&post=59&subd=brianbruijn&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://brianbruijn.wordpress.com/2008/06/12/ruby-on-rails-20-blog-in-15-minutes/feed/</wfw:commentRss>
	
		<media:content url="http://a.wordpress.com/avatar/tszao-128.jpg" medium="image">
			<media:title type="html">tszao</media:title>
		</media:content>
	</item>
		<item>
		<title>rails 2 find_by and find differences</title>
		<link>http://brianbruijn.wordpress.com/2008/06/11/rails-2-find_by-and-find-differences/</link>
		<comments>http://brianbruijn.wordpress.com/2008/06/11/rails-2-find_by-and-find-differences/#comments</comments>
		<pubDate>Wed, 11 Jun 2008 17:32:34 +0000</pubDate>
		<dc:creator>tszao</dc:creator>
		
		<category><![CDATA[agile development]]></category>

		<category><![CDATA[ruby]]></category>

		<category><![CDATA[ruby on rails]]></category>

		<category><![CDATA[tips]]></category>

		<category><![CDATA[array]]></category>

		<category><![CDATA[authentication]]></category>

		<category><![CDATA[find]]></category>

		<category><![CDATA[find_by]]></category>

		<category><![CDATA[nil object]]></category>

		<category><![CDATA[rails 2.0]]></category>

		<category><![CDATA[work around]]></category>

		<guid isPermaLink="false">http://brianbruijn.wordpress.com/?p=58</guid>
		<description><![CDATA[So this has been a day of bug tracking.
I use a very simple authentication process for a site that I am writing in Rails 2.0. Here is the def in my model.
#Original def
def self.authenticate(user_info)
user = find_by_username(user_info[:username])
if user.username == user_info[:username] &#38;&#38; user.hashed_password ==  hashed(user_info[:password])
return user
end
end
This may look familiar to some out there if you read [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>So this has been a day of bug tracking.</p>
<p>I use a very simple authentication process for a site that I am writing in Rails 2.0. Here is the def in my model.</p>
<p>#Original def<br />
def self.authenticate(user_info)<br />
user = find_by_username(user_info[:username])<br />
if user.username == user_info[:username] &amp;&amp; user.hashed_password ==  hashed(user_info[:password])<br />
return user<br />
end<br />
end</p>
<p>This may look familiar to some out there if you read the same materials that I read for pre-Rails 2 literature.  While trying to get all of my login stuff working with Rails 2 this creates a &#8230;</p>
<p><em>You have a nil object when you didn&#8217;t expect it!<br />
The error occurred while evaluating nil.username</em></p>
<p>This was a royal pain in the butt to fix but here is a work-around. I am not sure how viable it is as a solution, but I do know that it fixed my problem and now I can move on to the rest of the site without this thing hanging over my head.</p>
<p>Apparently in Rails 2.0 the way functions are called work differently than in Rails 1. I needed to use a different query to accomplish the same task. However, this particular query returns an array. So after you check the length of the recordset ( no [0] ) then you have to use the array ( with [0] ) to work with the results. Crazy thing is that when the results are returned to the controller, the need for the array disappears.</p>
<p>#work around def<br />
def self.authenticate(user_info)<br />
#get user using find instead of find_by_username<br />
user = User.find(:all, :conditions =&gt; ["username = ?", user_info[:username]] )<br />
#to check length of object you don&#8217;t need [0]<br />
if user.length &gt; 0<br />
#to use the object you do need the [0]<br />
if user[0].username == user_info[:username] &amp;&amp; user[0].hashed_password == hashed(user_info[:password])<br />
#when the result gets back to the controller the [0] will not need to be used<br />
return user[0]<br />
end<br />
end<br />
end</p>
<p>Let me know if you have a better solution for the work around.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/brianbruijn.wordpress.com/58/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/brianbruijn.wordpress.com/58/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/brianbruijn.wordpress.com/58/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/brianbruijn.wordpress.com/58/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/brianbruijn.wordpress.com/58/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/brianbruijn.wordpress.com/58/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/brianbruijn.wordpress.com/58/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/brianbruijn.wordpress.com/58/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/brianbruijn.wordpress.com/58/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/brianbruijn.wordpress.com/58/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/brianbruijn.wordpress.com/58/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/brianbruijn.wordpress.com/58/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=brianbruijn.wordpress.com&blog=1544312&post=58&subd=brianbruijn&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://brianbruijn.wordpress.com/2008/06/11/rails-2-find_by-and-find-differences/feed/</wfw:commentRss>
	
		<media:content url="http://a.wordpress.com/avatar/tszao-128.jpg" medium="image">
			<media:title type="html">tszao</media:title>
		</media:content>
	</item>
		<item>
		<title>Merge and Replication Fake Out</title>
		<link>http://brianbruijn.wordpress.com/2008/06/11/merge-and-replication-fake-out/</link>
		<comments>http://brianbruijn.wordpress.com/2008/06/11/merge-and-replication-fake-out/#comments</comments>
		<pubDate>Wed, 11 Jun 2008 15:43:32 +0000</pubDate>
		<dc:creator>tszao</dc:creator>
		
		<category><![CDATA[SQL Server]]></category>

		<category><![CDATA[database]]></category>

		<category><![CDATA[tips]]></category>

		<category><![CDATA[distribution]]></category>

		<category><![CDATA[merge]]></category>

		<category><![CDATA[named instance]]></category>

		<category><![CDATA[publication]]></category>

		<category><![CDATA[replication]]></category>

		<category><![CDATA[server]]></category>

		<category><![CDATA[sql server 2005]]></category>

		<guid isPermaLink="false">http://brianbruijn.wordpress.com/?p=57</guid>
		<description><![CDATA[So I have been trying to work with merge and replication lately. (SQL Server 2005) I am still by no means an expert, however, I ran into another issue that I would like to share how it was worked around.
We have a development box that we used at a conference to demonstrate &#8220;our&#8221; merge and [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>So I have been trying to work with merge and replication lately. (SQL Server 2005) I am still by no means an expert, however, I ran into another issue that I would like to share how it was worked around.</p>
<p>We have a development box that we used at a conference to demonstrate &#8220;our&#8221; merge and replication capabilities. Brought it back to the office and started to have issues with it. Essentially the distributor was already set up on the box but nothing was connected to it and we could not get rid of it.</p>
<p>I was assured by our network admin that the box had been cleaned. I have my doubts though. Finally, I got tired of trying to work with the muxed up database and created a fresh named instance.</p>
<p>Once we got it set up in the Surface Area Configuration Manager, all worked smoothly. We were able to set up a Publication with the same box as the distributor. Today we will add subscriptions.</p>
<p>I guess that I just needed to vent because training someone to do what you know can be a pain sometimes. Not necessarily because of the person, but just because the technology doesn’t always function properly.</p>
<p>I don’t know how tech support people do it.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/brianbruijn.wordpress.com/57/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/brianbruijn.wordpress.com/57/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/brianbruijn.wordpress.com/57/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/brianbruijn.wordpress.com/57/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/brianbruijn.wordpress.com/57/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/brianbruijn.wordpress.com/57/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/brianbruijn.wordpress.com/57/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/brianbruijn.wordpress.com/57/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/brianbruijn.wordpress.com/57/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/brianbruijn.wordpress.com/57/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/brianbruijn.wordpress.com/57/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/brianbruijn.wordpress.com/57/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=brianbruijn.wordpress.com&blog=1544312&post=57&subd=brianbruijn&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://brianbruijn.wordpress.com/2008/06/11/merge-and-replication-fake-out/feed/</wfw:commentRss>
	
		<media:content url="http://a.wordpress.com/avatar/tszao-128.jpg" medium="image">
			<media:title type="html">tszao</media:title>
		</media:content>
	</item>
		<item>
		<title>Visual FoxPro 9 and FoxPro Help for Newbies which I am one</title>
		<link>http://brianbruijn.wordpress.com/2008/05/16/visual-foxpro-9-and-foxpro-help-for-newbies-which-i-am-one/</link>
		<comments>http://brianbruijn.wordpress.com/2008/05/16/visual-foxpro-9-and-foxpro-help-for-newbies-which-i-am-one/#comments</comments>
		<pubDate>Fri, 16 May 2008 16:33:22 +0000</pubDate>
		<dc:creator>tszao</dc:creator>
		
		<category><![CDATA[Interests]]></category>

		<category><![CDATA[foxpro]]></category>

		<category><![CDATA[tips]]></category>

		<category><![CDATA[tutorial]]></category>

		<category><![CDATA[blogs]]></category>

		<category><![CDATA[guides]]></category>

		<category><![CDATA[help]]></category>

		<category><![CDATA[tutorials]]></category>

		<category><![CDATA[useful links]]></category>

		<category><![CDATA[vfp]]></category>

		<category><![CDATA[visual foxpro 9]]></category>

		<guid isPermaLink="false">http://brianbruijn.wordpress.com/?p=56</guid>
		<description><![CDATA[So you are new to Visual FoxPro 9. So am I. A little while ago I put out a cry for help to the community and got a couple of great responses from Kevin and Tod who were instrumental with helping me get my bearings.
Since the FoxPro Hell post I have managed to gather a [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>So you are new to Visual FoxPro 9. So am I. A little while ago I put out a cry for help to the community and got a couple of great responses from <a href="http://kevinragsdale.blogspot.com/">Kevin</a> and <a href="http://blog.todmeansfox.com/">Tod</a> who were instrumental with helping me get my bearings.</p>
<p>Since the <a href="http://brianbruijn.wordpress.com/2008/05/01/i-died-and-went-to-foxpro-hell/">FoxPro Hell post</a> I have managed to gather a few resources that have been very helpful with getting me up and running. Yes, I have progressed from FoxPro Hell to FoxPro Purgatory.</p>
<p>I am finally starting to get my head wrapped around the code base and there is actually light at the end of the tunnel. Let&#8217;s just hope it isn’t an oncoming train.</p>
<p>If you are new to FoxPro or Visual FoxPro 9, here is a list of resources that I have found very helpful.</p>
<p>Free (that&#8217;s right FREE) FoxPro Tutorial Videos<br />
<a href="http://www.garfieldhudson.com/FreeVideos.aspx"> Garfield Hudson – Learn Visual FoxPro – Free!!!</a><br />
<a href="http://www.sweetpotatosoftware.com/SPSBlog/PermaLink,guid,2baba34c-ebd6-46a3-aabe-35a4d7348014.aspx">Sweet Potato Software – Learning Visual FoxPro (Scroll to the bottom of the blog post)</a></p>
<p>Blogs – From people in the FoxPro Community<br />
<a title="http://kevinragsdale.blogspot.com/" href="http://kevinragsdale.blogspot.com/"> http://kevinragsdale.blogspot.com/</a><br />
<a title="http://blog.todmeansfox.com/" href="http://blog.todmeansfox.com/"> http://blog.todmeansfox.com/</a><br />
<a title="http://www.sweetpotatosoftware.com/SPSBlog/" href="http://www.sweetpotatosoftware.com/SPSBlog/"> http://www.sweetpotatosoftware.com/SPSBlog/</a><br />
<a title="http://learningvfp.blogspot.com/" href="http://learningvfp.blogspot.com/"> http://learningvfp.blogspot.com/</a><br />
<a title="http://doughennig.blogspot.com/" href="http://doughennig.blogspot.com/"> http://doughennig.blogspot.com/</a><br />
<a title="http://weblogs.foxite.com/bernardbout/" href="http://weblogs.foxite.com/bernardbout/"> http://weblogs.foxite.com/bernardbout/</a><br />
<a title="http://blogs.msdn.com/calvin_hsia/default.aspx" href="http://blogs.msdn.com/calvin_hsia/default.aspx"> http://blogs.msdn.com/calvin_hsia/default.aspx</a><br />
<a title="http://cathypountney.blogspot.com/" href="http://cathypountney.blogspot.com/"> http://cathypountney.blogspot.com/</a><br />
<a title="http://weblogs.foxite.com/vfpimaging/" href="http://weblogs.foxite.com/vfpimaging/"> http://weblogs.foxite.com/vfpimaging/</a><br />
<a title="http://spacefold.com/articles.aspx" href="http://spacefold.com/articles.aspx"> http://spacefold.com/articles.aspx</a><br />
<a title="http://talkingfox.blogspot.com/" href="http://talkingfox.blogspot.com/"> http://talkingfox.blogspot.com/</a><br />
<a title="http://weblogs.foxite.com/emersonreed/" href="http://weblogs.foxite.com/emersonreed/"> http://weblogs.foxite.com/emersonreed/</a><br />
<a title="http://www.rickborup.com/blog/" href="http://www.rickborup.com/blog/"> http://www.rickborup.com/blog/</a><br />
<a title="http://www.rickschummer.com/blog/" href="http://www.rickschummer.com/blog/"> http://www.rickschummer.com/blog/</a><br />
<a title="http://www.geeksandgurus.com/blogs/sjb/" href="http://www.geeksandgurus.com/blogs/sjb/"> http://www.geeksandgurus.com/blogs/sjb/</a><br />
<a title="http://weblogs.foxite.com/stuartdunkeld/" href="http://weblogs.foxite.com/stuartdunkeld/"> http://weblogs.foxite.com/stuartdunkeld/</a><br />
<a title="http://blog.visionpace.com/" href="http://blog.visionpace.com/"> http://blog.visionpace.com/</a></p>
<p>Conferences<br />
<a href="http://www.swfox.net/">Southwest Fox</a></p>
<p>Other Useful Links<br />
<a title="http://www.foxite.com/" href="http://www.foxite.com/"> http://www.foxite.com/</a><br />
<a title="http://www.universalthread.com/" href="http://www.universalthread.com/"> http://www.universalthread.com/</a><br />
<a title="http://fox.wikis.com/wc.dll?Wiki~VisualFoxProWiki" href="http://fox.wikis.com/wc.dll?Wiki~VisualFoxProWiki"> http://fox.wikis.com/wc.dll?Wiki~VisualFoxProWiki</a><br />
<a title="http://www.cs.trinity.edu/~thicks/Tutorials/" href="http://www.cs.trinity.edu/~thicks/Tutorials/"> http://www.cs.trinity.edu/~thicks/Tutorials/</a> (scroll down to the FoxPro tutorials)<br />
<a title="http://learningvfp.blogspot.com/2005/12/learning-foxpro-articles.html#links" href="http://learningvfp.blogspot.com/2005/12/learning-foxpro-articles.html#links"> http://learningvfp.blogspot.com/2005/12/learning-foxpro-articles.html#links</a></p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/brianbruijn.wordpress.com/56/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/brianbruijn.wordpress.com/56/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/brianbruijn.wordpress.com/56/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/brianbruijn.wordpress.com/56/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/brianbruijn.wordpress.com/56/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/brianbruijn.wordpress.com/56/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/brianbruijn.wordpress.com/56/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/brianbruijn.wordpress.com/56/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/brianbruijn.wordpress.com/56/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/brianbruijn.wordpress.com/56/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/brianbruijn.wordpress.com/56/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/brianbruijn.wordpress.com/56/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=brianbruijn.wordpress.com&blog=1544312&post=56&subd=brianbruijn&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://brianbruijn.wordpress.com/2008/05/16/visual-foxpro-9-and-foxpro-help-for-newbies-which-i-am-one/feed/</wfw:commentRss>
	
		<media:content url="http://a.wordpress.com/avatar/tszao-128.jpg" medium="image">
			<media:title type="html">tszao</media:title>
		</media:content>
	</item>
		<item>
		<title>ActionMailer set-up differences</title>
		<link>http://brianbruijn.wordpress.com/2008/05/12/actionmailer-set-up-differences/</link>
		<comments>http://brianbruijn.wordpress.com/2008/05/12/actionmailer-set-up-differences/#comments</comments>
		<pubDate>Mon, 12 May 2008 19:34:43 +0000</pubDate>
		<dc:creator>tszao</dc:creator>
		
		<category><![CDATA[ruby]]></category>

		<category><![CDATA[ruby on rails]]></category>

		<category><![CDATA[tips]]></category>

		<category><![CDATA[ActionMailer]]></category>

		<category><![CDATA[mail]]></category>

		<category><![CDATA[rails 2.0]]></category>

		<guid isPermaLink="false">http://brianbruijn.wordpress.com/?p=55</guid>
		<description><![CDATA[Ok, here is one more thing for those who are used to the pre Rails 2.0 days.
When setting up the ActionMailer in your environment.rb, you will need to make a slight adjustment with the syntax.
Previously the code looked like this:
ActionMailer::Base.delivery_method = :smtp
ActionMailer::Base.server_settings = {
:address =&#62; &#8220;mail.langorang.com&#8221;,
:port =&#62; 25,
:domain =&#62; &#8220;langorang.com&#8221;,
:authentication =&#62; :login,
:user_name =&#62; &#8220;no-reply@langorang.com&#8221;,
:password =&#62; [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Ok, here is one more thing for those who are used to the pre Rails 2.0 days.</p>
<p>When setting up the ActionMailer in your environment.rb, you will need to make a slight adjustment with the syntax.</p>
<p>Previously the code looked like this:</p>
<p>ActionMailer::Base.delivery_method = :smtp<br />
ActionMailer::Base.server_settings = {<br />
:address =&gt; &#8220;mail.langorang.com&#8221;,<br />
:port =&gt; 25,<br />
:domain =&gt; &#8220;langorang.com&#8221;,<br />
:authentication =&gt; :login,<br />
:user_name =&gt; &#8220;no-reply@langorang.com&#8221;,<br />
:password =&gt; &#8220;**************&#8221;,<br />
}</p>
<p>Now it looks like this (notice the bold)</p>
<p>ActionMailer::Base.delivery_method = :smtp<br />
ActionMailer::Base.<strong>smtp_settings</strong>= {<br />
:address =&gt; &#8220;mail.envion.com&#8221;,<br />
:port =&gt; 25,<br />
:domain =&gt; &#8220;envion.com&#8221;,<br />
:authentication =&gt; :login,<br />
:user_name =&gt; no-reply@envion.com&#8221;,<br />
:password =&gt; &#8220;*********&#8221;,<br />
}</p>
<p>server_settings need to be changed to smtp_settings. I know it is minor but it will give ya real fits if you are trying to install simple captcha in a rails 2.0 environment.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/brianbruijn.wordpress.com/55/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/brianbruijn.wordpress.com/55/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/brianbruijn.wordpress.com/55/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/brianbruijn.wordpress.com/55/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/brianbruijn.wordpress.com/55/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/brianbruijn.wordpress.com/55/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/brianbruijn.wordpress.com/55/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/brianbruijn.wordpress.com/55/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/brianbruijn.wordpress.com/55/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/brianbruijn.wordpress.com/55/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/brianbruijn.wordpress.com/55/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/brianbruijn.wordpress.com/55/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=brianbruijn.wordpress.com&blog=1544312&post=55&subd=brianbruijn&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://brianbruijn.wordpress.com/2008/05/12/actionmailer-set-up-differences/feed/</wfw:commentRss>
	
		<media:content url="http://a.wordpress.com/avatar/tszao-128.jpg" medium="image">
			<media:title type="html">tszao</media:title>
		</media:content>
	</item>
		<item>
		<title>mysql_stmt_row_tell and libmysql.dll error for Instant Rails</title>
		<link>http://brianbruijn.wordpress.com/2008/05/12/mysql_stmt_row_tell-and-libmysqldll-error-for-instant-rails/</link>
		<comments>http://brianbruijn.wordpress.com/2008/05/12/mysql_stmt_row_tell-and-libmysqldll-error-for-instant-rails/#comments</comments>
		<pubDate>Mon, 12 May 2008 17:07:57 +0000</pubDate>
		<dc:creator>tszao</dc:creator>
		
		<category><![CDATA[mysql]]></category>

		<category><![CDATA[ruby]]></category>

		<category><![CDATA[ruby on rails]]></category>

		<category><![CDATA[tips]]></category>

		<category><![CDATA[dll hell]]></category>

		<category><![CDATA[instant rails]]></category>

		<category><![CDATA[rails 2.0]]></category>

		<guid isPermaLink="false">http://brianbruijn.wordpress.com/?p=54</guid>
		<description><![CDATA[If you are getting the following error using Instant Rails for Rails 2.0 here is a quick fix that will get you working again.
&#8220;The procedure entry point mysql_stmt_row_tell could not be located in the dynamic link library libmysql.dll&#8221;
You will need to manually copy the libmysql.dll to the \ruby\bin directory. You can find the libmysql.dll in [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>If you are getting the following error using Instant Rails for Rails 2.0 here is a quick fix that will get you working again.</p>
<p>&#8220;The procedure entry point mysql_stmt_row_tell could not be located in the dynamic link library libmysql.dll&#8221;</p>
<p>You will need to manually copy the libmysql.dll to the \ruby\bin directory. You can find the libmysql.dll in the \mysql\bin directory in side you Instant Rails folder. </p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/brianbruijn.wordpress.com/54/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/brianbruijn.wordpress.com/54/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/brianbruijn.wordpress.com/54/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/brianbruijn.wordpress.com/54/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/brianbruijn.wordpress.com/54/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/brianbruijn.wordpress.com/54/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/brianbruijn.wordpress.com/54/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/brianbruijn.wordpress.com/54/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/brianbruijn.wordpress.com/54/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/brianbruijn.wordpress.com/54/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/brianbruijn.wordpress.com/54/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/brianbruijn.wordpress.com/54/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=brianbruijn.wordpress.com&blog=1544312&post=54&subd=brianbruijn&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://brianbruijn.wordpress.com/2008/05/12/mysql_stmt_row_tell-and-libmysqldll-error-for-instant-rails/feed/</wfw:commentRss>
	
		<media:content url="http://a.wordpress.com/avatar/tszao-128.jpg" medium="image">
			<media:title type="html">tszao</media:title>
		</media:content>
	</item>
		<item>
		<title>I died and went to FoxPro Hell</title>
		<link>http://brianbruijn.wordpress.com/2008/05/01/i-died-and-went-to-foxpro-hell/</link>
		<comments>http://brianbruijn.wordpress.com/2008/05/01/i-died-and-went-to-foxpro-hell/#comments</comments>
		<pubDate>Thu, 01 May 2008 16:41:00 +0000</pubDate>
		<dc:creator>tszao</dc:creator>
		
		<category><![CDATA[foxpro]]></category>

		<category><![CDATA[hell]]></category>

		<category><![CDATA[page frame]]></category>

		<guid isPermaLink="false">http://brianbruijn.wordpress.com/?p=53</guid>
		<description><![CDATA[I am in FoxPro Hell!!!
At my day job, we have a project that was written in FoxPro and eventually bumped up to Visual FoxPro 9. It works. The project actually fires up and still does what it is supposed to do. However, I have been tasked with trying to clean it up. I have never [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I am in FoxPro Hell!!!</p>
<p>At my day job, we have a project that was written in FoxPro and eventually bumped up to Visual FoxPro 9. It works. The project actually fires up and still does what it is supposed to do. However, I have been tasked with trying to clean it up. I have never worked with FoxPro before and it is ugly. At least <b>this</b> codebase is ugly. Some things make sense and others do not. </p>
<p>Currently I am trying to figure out how to release a Page Frame tab from a parent class. I get the following error. </p>
<p>&#8220;Cannot delete objects because some are members of a parent class&#8221;</p>
<p>Frustrating, because I have removed all the code that makes the thing work and I still get this error.  If anyone out there has any ideas, I would be eternally grateful.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/brianbruijn.wordpress.com/53/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/brianbruijn.wordpress.com/53/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/brianbruijn.wordpress.com/53/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/brianbruijn.wordpress.com/53/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/brianbruijn.wordpress.com/53/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/brianbruijn.wordpress.com/53/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/brianbruijn.wordpress.com/53/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/brianbruijn.wordpress.com/53/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/brianbruijn.wordpress.com/53/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/brianbruijn.wordpress.com/53/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/brianbruijn.wordpress.com/53/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/brianbruijn.wordpress.com/53/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=brianbruijn.wordpress.com&blog=1544312&post=53&subd=brianbruijn&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://brianbruijn.wordpress.com/2008/05/01/i-died-and-went-to-foxpro-hell/feed/</wfw:commentRss>
	
		<media:content url="http://a.wordpress.com/avatar/tszao-128.jpg" medium="image">
			<media:title type="html">tszao</media:title>
		</media:content>
	</item>
		<item>
		<title>Error has occurred while establishing a connection to the server</title>
		<link>http://brianbruijn.wordpress.com/2008/04/09/error-has-occurred-while-establishing-a-connection-to-the-server/</link>
		<comments>http://brianbruijn.wordpress.com/2008/04/09/error-has-occurred-while-establishing-a-connection-to-the-server/#comments</comments>
		<pubDate>Wed, 09 Apr 2008 18:45:38 +0000</pubDate>
		<dc:creator>tszao</dc:creator>
		
		<category><![CDATA[SQL Server]]></category>

		<category><![CDATA[database]]></category>

		<category><![CDATA[helpful tips]]></category>

		<category><![CDATA[tips]]></category>

		<category><![CDATA[services]]></category>

		<category><![CDATA[sql server 2005]]></category>

		<category><![CDATA[SQL Server Browser]]></category>

		<category><![CDATA[Surface Area Configuration]]></category>

		<guid isPermaLink="false">http://brianbruijn.wordpress.com/?p=52</guid>
		<description><![CDATA[I got this error recently and wanted to share with the world what took me a day to debug.
An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I got this error recently and wanted to share with the world what took me a day to debug.</p>
<blockquote><p>An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)</p></blockquote>
<p>This will look like a total duh moment but it makes sense when one considers the circumstances.</p>
<p>The first response (assuming you know the SQL instance is running) to above is to go to the Surface Area Configuration manager for SQL 2005. Once there, make sure that your instance is set up to work with TCP and Named Pipes.</p>
<p>The next course of action is to check the firewall to see if it is blocking the server or the ports you need to access the system remotely.</p>
<p>If none of that is an issue, you need to consider another option. Look in your services. I am going to assume that the sql server instance is started and you have at least tried to connect to it from you local SSMS.</p>
<p>However, what about the <strong>SQL Server Browser</strong> service? If you are like me, you want to keep as little from starting at start-up as possible and shut down services when they are not used frequently. However, if when you start the server instance and forget to start the SQL Server Browser instance you will run into an error very similar to the one above. Make sure that your SQL Server Browser service is started and you should be good to go.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/brianbruijn.wordpress.com/52/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/brianbruijn.wordpress.com/52/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/brianbruijn.wordpress.com/52/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/brianbruijn.wordpress.com/52/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/brianbruijn.wordpress.com/52/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/brianbruijn.wordpress.com/52/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/brianbruijn.wordpress.com/52/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/brianbruijn.wordpress.com/52/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/brianbruijn.wordpress.com/52/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/brianbruijn.wordpress.com/52/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/brianbruijn.wordpress.com/52/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/brianbruijn.wordpress.com/52/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=brianbruijn.wordpress.com&blog=1544312&post=52&subd=brianbruijn&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://brianbruijn.wordpress.com/2008/04/09/error-has-occurred-while-establishing-a-connection-to-the-server/feed/</wfw:commentRss>
	
		<media:content url="http://a.wordpress.com/avatar/tszao-128.jpg" medium="image">
			<media:title type="html">tszao</media:title>
		</media:content>
	</item>
	</channel>
</rss>