<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blog.vuscode.com/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>How to build your own SQL Server Explorer</title><link>http://blog.vuscode.com/malovicn/archive/2007/11/12/how-to-build-your-own-sql-server-explorer.aspx</link><description>How to build your own SQL Server Managment Studio? What are the concrete ways of getting information related to your Sql server, databases, tables?</description><dc:language>en</dc:language><generator>CommunityServer 2007 (Build: 20416.853)</generator><item><title>re: How to build your own SQL Server Explorer</title><link>http://blog.vuscode.com/malovicn/archive/2007/11/12/how-to-build-your-own-sql-server-explorer.aspx#728</link><pubDate>Thu, 23 Jul 2009 08:46:12 GMT</pubDate><guid isPermaLink="false">4fad33ed-6fa7-4667-b447-1fa3be86b49e:728</guid><dc:creator>Andew Michnik</dc:creator><description>&lt;p&gt;Fantastic&lt;/p&gt;
&lt;img src="http://blog.vuscode.com/aggbug.aspx?PostID=728" width="1" height="1"&gt;</description></item><item><title>re: How to build your own SQL Server Explorer</title><link>http://blog.vuscode.com/malovicn/archive/2007/11/12/how-to-build-your-own-sql-server-explorer.aspx#668</link><pubDate>Wed, 08 Jul 2009 17:59:20 GMT</pubDate><guid isPermaLink="false">4fad33ed-6fa7-4667-b447-1fa3be86b49e:668</guid><dc:creator>Ambal</dc:creator><description>&lt;p&gt;Is there any other way to find whether a column of a table is PK or FK? You have used the following code to determine that.&lt;/p&gt;
&lt;p&gt;bool isPrimaryKey = row[&amp;quot;constarint_name&amp;quot;].ToString().StartsWith(&amp;quot;PK&amp;quot;);&lt;/p&gt;
&lt;p&gt;What if the primary key name doesn't start with 'PK' or 'FK'?&lt;/p&gt;
&lt;img src="http://blog.vuscode.com/aggbug.aspx?PostID=668" width="1" height="1"&gt;</description></item><item><title>re: How to build your own SQL Server Explorer</title><link>http://blog.vuscode.com/malovicn/archive/2007/11/12/how-to-build-your-own-sql-server-explorer.aspx#638</link><pubDate>Thu, 28 May 2009 10:25:00 GMT</pubDate><guid isPermaLink="false">4fad33ed-6fa7-4667-b447-1fa3be86b49e:638</guid><dc:creator>waleed</dc:creator><description>&lt;p&gt;thanks a lot &amp;nbsp;malovicn&lt;/p&gt;
&lt;p&gt;you helped very much in the indexColumns part.&lt;/p&gt;
&lt;p&gt;thanks and best regards&lt;/p&gt;
&lt;img src="http://blog.vuscode.com/aggbug.aspx?PostID=638" width="1" height="1"&gt;</description></item><item><title>Kostenloser WEB Space</title><link>http://blog.vuscode.com/malovicn/archive/2007/11/12/how-to-build-your-own-sql-server-explorer.aspx#594</link><pubDate>Wed, 21 Jan 2009 13:00:57 GMT</pubDate><guid isPermaLink="false">4fad33ed-6fa7-4667-b447-1fa3be86b49e:594</guid><dc:creator>Kostenloser WEB Space</dc:creator><description>&lt;p&gt;Archiv aus Deutschland und aller Welt mit Informationen und Links zum Empfang von Webradio, Web-TV&lt;/p&gt;
&lt;img src="http://blog.vuscode.com/aggbug.aspx?PostID=594" width="1" height="1"&gt;</description></item><item><title>re: How to build your own SQL Server Explorer</title><link>http://blog.vuscode.com/malovicn/archive/2007/11/12/how-to-build-your-own-sql-server-explorer.aspx#534</link><pubDate>Fri, 14 Nov 2008 11:07:59 GMT</pubDate><guid isPermaLink="false">4fad33ed-6fa7-4667-b447-1fa3be86b49e:534</guid><dc:creator>Chikelue Oji</dc:creator><description>&lt;p&gt;I just figured out that I could test for the list returned by GetDataSource and if it is null when I am not connected to a LAN, then I could prompt the user for a Sql Server instance. This &amp;nbsp;is a manual way of doing this and the user would have to know the instances beforehand. &lt;/p&gt;
&lt;p&gt;We can hard code the instances as shown below and the program would still work.&lt;/p&gt;
&lt;p&gt;//string[] strLocalServers = new string[] {&amp;quot;chikeo-pc&amp;quot;, &amp;quot;chikeo-pc\\sqlexpress&amp;quot;};&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;//Later add code to check if List servers is null and then to accept entry of server instance name from the user if so.&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;//If IList&amp;lt;string&amp;gt; servers is null, that means that the host computer is not connected to a local area network.&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;//IList&amp;lt;string&amp;gt; servers = SqlHelper.GetActiveServers();&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;int machineNameLength = Environment.MachineName.Length;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;int selectedIndex = -1;&lt;/p&gt;
&lt;p&gt;Please if anyone has any other way of doing this, please let me know. If it can be done with SQL-DMO, can SQL-DMO be used for enumerating SQL 2005 as well and how can I use it without installing Enterprise Manager?&lt;/p&gt;
&lt;p&gt;Thanks indvance.&lt;/p&gt;
&lt;img src="http://blog.vuscode.com/aggbug.aspx?PostID=534" width="1" height="1"&gt;</description></item><item><title>re: How to build your own SQL Server Explorer</title><link>http://blog.vuscode.com/malovicn/archive/2007/11/12/how-to-build-your-own-sql-server-explorer.aspx#533</link><pubDate>Fri, 14 Nov 2008 09:42:48 GMT</pubDate><guid isPermaLink="false">4fad33ed-6fa7-4667-b447-1fa3be86b49e:533</guid><dc:creator>Chikelue Oji</dc:creator><description>&lt;p&gt;Wonderful article but like Peter identified, it seems it doesn't retrieve any Sql Server instances for standalone machines. How can one get a list of Sql Server instances when the machine is not connected to network but it is having multiple SQL Server Instances running in it?.&lt;/p&gt;
&lt;p&gt;Thanks a lot in advance for your reply.&lt;/p&gt;
&lt;img src="http://blog.vuscode.com/aggbug.aspx?PostID=533" width="1" height="1"&gt;</description></item><item><title>re: How to build your own SQL Server Explorer</title><link>http://blog.vuscode.com/malovicn/archive/2007/11/12/how-to-build-your-own-sql-server-explorer.aspx#508</link><pubDate>Sun, 14 Sep 2008 11:21:44 GMT</pubDate><guid isPermaLink="false">4fad33ed-6fa7-4667-b447-1fa3be86b49e:508</guid><dc:creator>David Lean</dc:creator><description>&lt;p&gt;Excellent Article. Much clearer than other documentation out there. Thanks&lt;/p&gt;
&lt;img src="http://blog.vuscode.com/aggbug.aspx?PostID=508" width="1" height="1"&gt;</description></item><item><title>re: How to build your own SQL Server Explorer</title><link>http://blog.vuscode.com/malovicn/archive/2007/11/12/how-to-build-your-own-sql-server-explorer.aspx#283</link><pubDate>Mon, 17 Dec 2007 20:20:51 GMT</pubDate><guid isPermaLink="false">4fad33ed-6fa7-4667-b447-1fa3be86b49e:283</guid><dc:creator>Peter</dc:creator><description>&lt;p&gt;It seems that GetDataSource will not work when a machine is not connected to network. &amp;nbsp; How can I get list of SQL Server Instances when the machine is not connected to network but it is having multiple SQL Server Instances running in it?&lt;/p&gt;
&lt;img src="http://blog.vuscode.com/aggbug.aspx?PostID=283" width="1" height="1"&gt;</description></item><item><title>re: How to build your own SQL Server Explorer</title><link>http://blog.vuscode.com/malovicn/archive/2007/11/12/how-to-build-your-own-sql-server-explorer.aspx#282</link><pubDate>Mon, 17 Dec 2007 20:19:09 GMT</pubDate><guid isPermaLink="false">4fad33ed-6fa7-4667-b447-1fa3be86b49e:282</guid><dc:creator>Peter</dc:creator><description>&lt;p&gt;It seems that GetDataSource will not work when a machine is not connected to network. &amp;nbsp;How can I get a list of SQL Server Instances when the machine is not connected to network and has multiple SQL Server Instances running on it?&lt;/p&gt;
&lt;img src="http://blog.vuscode.com/aggbug.aspx?PostID=282" width="1" height="1"&gt;</description></item><item><title>re: How to build your own SQL Server Explorer</title><link>http://blog.vuscode.com/malovicn/archive/2007/11/12/how-to-build-your-own-sql-server-explorer.aspx#246</link><pubDate>Thu, 22 Nov 2007 15:09:49 GMT</pubDate><guid isPermaLink="false">4fad33ed-6fa7-4667-b447-1fa3be86b49e:246</guid><dc:creator>oykica</dc:creator><description>&lt;p&gt;Thanks for sharing your code.&lt;/p&gt;
&lt;p&gt;I think the formatting for the decimal data type should be:&lt;/p&gt;
&lt;p&gt;string.Format(&amp;quot;{0}({1},{2})&amp;quot;, columnDataType, row[&amp;quot;numeric_precision&amp;quot;], row[&amp;quot;numeric_scale&amp;quot;]);&lt;/p&gt;
&lt;img src="http://blog.vuscode.com/aggbug.aspx?PostID=246" width="1" height="1"&gt;</description></item></channel></rss>