public override object GetProperty(AbstractSharpQueryConnectionWrapper.SharpQueryPropertyEnum property) { object returnValue = null; switch (property) { case SharpQueryPropertyEnum.Catalog: case SharpQueryPropertyEnum.DataSourceName: returnValue = this.pOLEConnection.Database; break; case SharpQueryPropertyEnum.ConnectionString: returnValue = this.pOLEConnection.ConnectionString.ToString(); break; case SharpQueryPropertyEnum.DataSource: returnValue = this.pOLEConnection.DataSource; break; case SharpQueryPropertyEnum.DBMSName: returnValue = ""; break; case SharpQueryPropertyEnum.ProviderName: //Key = "Provider Name"; returnValue = this.pOLEConnection.Provider.ToString(); break; default: returnValue = null; break; } return returnValue; }
public override object GetProperty(AbstractSharpQueryConnectionWrapper.SharpQueryPropertyEnum property) { object returnValue = null; string Key = null; switch (property) { case SharpQueryPropertyEnum.Catalog: Key = "Current Catalog"; break; case SharpQueryPropertyEnum.ConnectionString: returnValue = this.pADOConnection.ConnectionString.ToString(); break; case SharpQueryPropertyEnum.DataSource: Key = "Data Source"; break; case SharpQueryPropertyEnum.DataSourceName: Key = "Data Source Name"; break; case SharpQueryPropertyEnum.DBMSName: Key = "DBMS Name"; break; case SharpQueryPropertyEnum.ProviderName: returnValue = this.pADOConnection.Provider.ToString(); break; default: Key = null; break; } try { if (Key != null) { if (this.pADOConnection.Properties[Key].Value != null) { returnValue = this.pADOConnection.Properties[Key].Value; } } } catch (System.Exception) { returnValue = null; } return returnValue; }
public abstract object GetProperty(AbstractSharpQueryConnectionWrapper.SharpQueryPropertyEnum property);