﻿<?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?)  / Getting the provider type / 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>Tue, 02 Dec 2008 16:00:17 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: Getting the provider type</title><link>http://forum.strataframe.net/Topic1901-6-1.aspx</link><description>No problem :)</description><pubDate>Fri, 21 Jul 2006 09:14:10 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: Getting the provider type</title><link>http://forum.strataframe.net/Topic1901-6-1.aspx</link><description>Great!  thanks.</description><pubDate>Thu, 20 Jul 2006 17:04:43 GMT</pubDate><dc:creator>Andria Jensen</dc:creator></item><item><title>RE: Getting the provider type</title><link>http://forum.strataframe.net/Topic1901-6-1.aspx</link><description>Once you determine the type, use a ConnectionStringBuilder, pass it the connection string, and it will parse it for you.&lt;/P&gt;&lt;P&gt;Dim loConn As New System.Data.SqlClient.SqlConnectionStringBuilder(MicroFour.StrataFrame.Data.DataBasics.DataSources(0).ConnectionString)&lt;/P&gt;&lt;P&gt;        MsgBox(loConn.DataSource)&lt;BR&gt;        MsgBox(loConn.UserID)&lt;BR&gt;        MsgBox(loConn.Password)</description><pubDate>Thu, 20 Jul 2006 16:59:40 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: Getting the provider type</title><link>http://forum.strataframe.net/Topic1901-6-1.aspx</link><description>Ok, that works for getting the type.  Is there any way to get the other information I referred to like Database Name, User ID, Password, and Server?  I can parse the connection string, but this seems a little unreliable.</description><pubDate>Thu, 20 Jul 2006 16:56:09 GMT</pubDate><dc:creator>Andria Jensen</dc:creator></item><item><title>RE: Getting the provider type</title><link>http://forum.strataframe.net/Topic1901-6-1.aspx</link><description>There are several options.  You can test on the data source type to determine which provider is being used based on the type of object which would probably be the easiest.&lt;/P&gt;&lt;P&gt;&lt;FONT color=#1111ff&gt;Dim loType As System.Type = MicroFour.StrataFrame.Data.DataBasics.DataSources.Item("").GetType()&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color=#1111ff&gt;        If loType Is GetType(MicroFour.StrataFrame.Data.SqlDataSourceItem) Then&lt;BR&gt;            MsgBox("SQL Server")&lt;BR&gt;        ElseIf loType Is GetType(MicroFour.StrataFrame.Data.OracleDataSourceItem) Then&lt;BR&gt;            MsgBox("Oracle")&lt;BR&gt;        ElseIf loType Is GetType(MicroFour.StrataFrame.Data.VfpDataSourceItem) Then&lt;BR&gt;            MsgBox("VFP")&lt;BR&gt;        ElseIf loType Is GetType(MicroFour.StrataFrame.Data.AccessDataSourceItem) Then&lt;BR&gt;            MsgBox("Access")&lt;BR&gt;        End If&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;/STRONG&gt; </description><pubDate>Thu, 20 Jul 2006 15:57:53 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>Getting the provider type</title><link>http://forum.strataframe.net/Topic1901-6-1.aspx</link><description>How do I get the provider type from the data source?  I would like to know whether I am looking at a SQL, Oracle, DB2, etc. database.  Also, is there any way other than parsing the connection string to get out the Server, Database Name, User ID, and Password? </description><pubDate>Thu, 20 Jul 2006 15:32:25 GMT</pubDate><dc:creator>Andria Jensen</dc:creator></item></channel></rss>