﻿<?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 - V1 » Business Objects and Data Access (How do I?)  » Enumerate Database Names</title><generator>InstantForum 2017-1 Final</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>StrataFrame Forum</webMaster><lastBuildDate>Tue, 09 Jun 2026 17:44:41 GMT</lastBuildDate><ttl>20</ttl><item><title>Enumerate Database Names</title><link>http://forum.strataframe.net/FindPost7159.aspx</link><description>How do I get a list of Databases available on a Server?</description><pubDate>Tue, 27 Feb 2007 17:10:06 GMT</pubDate><dc:creator>Kent Meyer</dc:creator></item><item><title>RE: Enumerate Database Names</title><link>http://forum.strataframe.net/FindPost7202.aspx</link><description>Ah, the ConnectionManager uses the GetSchema() method internally, but I don't believe that the method is exposed to enumerate the databases.&amp;nbsp; We have a background worker thread that gathers the available databases when the you click the drop-down for the database selection.</description><pubDate>Tue, 27 Feb 2007 17:10:06 GMT</pubDate><dc:creator>StrataFrame Team</dc:creator></item><item><title>RE: Enumerate Database Names</title><link>http://forum.strataframe.net/FindPost7200.aspx</link><description>I was just wondering if there was a way do do this using the Strataframe connection manager...</description><pubDate>Tue, 27 Feb 2007 14:37:54 GMT</pubDate><dc:creator>Kent Meyer</dc:creator></item><item><title>RE: Enumerate Database Names</title><link>http://forum.strataframe.net/FindPost7172.aspx</link><description>Yes, the GetSchema() is probably the preferred way to do it.&amp;nbsp; You can also look at the sys.sysobjects view and I think there is a sys.sysdatabases view, but using GetSchema() is version independent.&amp;nbsp; Also, if you call GetSchema() and don't pass it any restrictions, it will give you a DataTable containing the different schema objects that can be queried and the restrictions that are needed to narrow each of the selections.</description><pubDate>Mon, 26 Feb 2007 09:23:38 GMT</pubDate><dc:creator>StrataFrame Team</dc:creator></item><item><title>RE: Enumerate Database Names</title><link>http://forum.strataframe.net/FindPost7160.aspx</link><description>&lt;FONT size=2&gt;&lt;P&gt;Here is one way....&lt;/FONT&gt;&lt;FONT color=#008080 size=2&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color=#008080 size=2&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color=#008080 size=2&gt;SqlConnectionStringBuilder&lt;/FONT&gt;&lt;FONT size=2&gt; cnStr = &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;new&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#008080 size=2&gt;SqlConnectionStringBuilder&lt;/FONT&gt;&lt;FONT size=2&gt;();&lt;/P&gt;&lt;P&gt;cnStr.UserID = &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;this&lt;/FONT&gt;&lt;FONT size=2&gt;.txtUsername.Text;&lt;/P&gt;&lt;P&gt;cnStr.Password = &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;this&lt;/FONT&gt;&lt;FONT size=2&gt;.txtPassword.Text;&lt;/P&gt;&lt;P&gt;cnStr.DataSource = &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;this&lt;/FONT&gt;&lt;FONT size=2&gt;.cboSQLServer.Text;&lt;/P&gt;&lt;P&gt;cnStr.ConnectTimeout = 30;&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008080 size=2&gt;SqlConnection&lt;/FONT&gt;&lt;FONT size=2&gt; cn = &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;new&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#008080 size=2&gt;SqlConnection&lt;/FONT&gt;&lt;FONT size=2&gt;();&lt;/P&gt;&lt;P&gt;cn.ConnectionString = cnStr.ConnectionString;&lt;/P&gt;&lt;P&gt;cn.Open();&lt;/P&gt;&lt;P&gt;System.Data.&lt;/FONT&gt;&lt;FONT color=#008080 size=2&gt;DataTable&lt;/FONT&gt;&lt;FONT size=2&gt; dbList = cn.GetSchema(&lt;/FONT&gt;&lt;FONT color=#800000 size=2&gt;"Databases"&lt;/FONT&gt;&lt;FONT size=2&gt;);&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;foreach&lt;/FONT&gt;&lt;FONT size=2&gt; (System.Data.&lt;/FONT&gt;&lt;FONT color=#008080 size=2&gt;DataRow&lt;/FONT&gt;&lt;FONT size=2&gt; row &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;in&lt;/FONT&gt;&lt;FONT size=2&gt; dbList.Rows)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;this&lt;/FONT&gt;&lt;FONT size=2&gt;.cboDatabase.Items.Add(row[0]);&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;/FONT&gt;</description><pubDate>Sun, 25 Feb 2007 12:00:17 GMT</pubDate><dc:creator>Kent Meyer</dc:creator></item></channel></rss>