﻿<?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?)  » Getting the provider type</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 14:17:24 GMT</lastBuildDate><ttl>20</ttl><item><title>Getting the provider type</title><link>http://forum.strataframe.net/FindPost1901.aspx</link><description>How do I get the provider type from the data source?&amp;nbsp; I would like to know whether I am looking at a SQL, Oracle, DB2, etc. database.&amp;nbsp; Also, is there any way other than parsing the connection string to get out the Server, Database Name, User ID, and Password?&amp;nbsp;</description><pubDate>Fri, 21 Jul 2006 09:14:10 GMT</pubDate><dc:creator>Andria Jensen</dc:creator></item><item><title>RE: Getting the provider type</title><link>http://forum.strataframe.net/FindPost1909.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/FindPost1906.aspx</link><description>Great!&amp;nbsp; 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/FindPost1905.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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MsgBox(loConn.DataSource)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MsgBox(loConn.UserID)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 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/FindPost1904.aspx</link><description>Ok, that works for getting the type.&amp;nbsp; Is there any way to get the other information I referred to like Database Name, User ID, Password, and Server?&amp;nbsp; 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/FindPost1902.aspx</link><description>There are several options.&amp;nbsp; 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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If loType Is GetType(MicroFour.StrataFrame.Data.SqlDataSourceItem) Then&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MsgBox("SQL Server")&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ElseIf loType Is GetType(MicroFour.StrataFrame.Data.OracleDataSourceItem) Then&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MsgBox("Oracle")&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ElseIf loType Is GetType(MicroFour.StrataFrame.Data.VfpDataSourceItem) Then&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MsgBox("VFP")&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ElseIf loType Is GetType(MicroFour.StrataFrame.Data.AccessDataSourceItem) Then&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MsgBox("Access")&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End If&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;/STRONG&gt;&amp;nbsp;</description><pubDate>Thu, 20 Jul 2006 15:57:53 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item></channel></rss>