public override IConnectionStringDictionary GetConnectionStringBuilder(string connectionString) { //TBD: should wrap the IConnectionStringDictionary IConnectionStringDictionary conectionStringBuilder = base.GetConnectionStringBuilder(connectionString); OleDbSqlHelper.InitConnectionStringBuilder(conectionStringBuilder); return(conectionStringBuilder); }
public override IConnectionStringDictionary GetConnectionStringBuilder(string connectionString) { IConnectionStringDictionary conectionStringBuilder = base.GetConnectionStringBuilder(connectionString); string port = (string)conectionStringBuilder [Port]; if (port == null || port.Length == 0) { port = (string)ProviderInfo [Port]; conectionStringBuilder.Add(Port, port); } return(conectionStringBuilder); }
public virtual java.sql.Connection GetConnection(IConnectionStringDictionary conectionStringBuilder) { string dataSourceJndi = (string)conectionStringBuilder.GetValue("jndi-datasource-name"); if (dataSourceJndi != null && dataSourceJndi.Length > 0) { string namingProviderUrl = (string)conectionStringBuilder.GetValue("naming-provider-url"); string namingFactoryInitial = (string)conectionStringBuilder.GetValue("naming-factory-initial"); DataSource ds = _dataSourceCache.GetDataSource(dataSourceJndi, namingProviderUrl, namingFactoryInitial); return(ds.getConnection()); } JdbcUrlConnector connector = new JdbcUrlConnector(this, conectionStringBuilder); return(connector.Connection); }
public override IConnectionStringDictionary GetConnectionStringBuilder(string connectionString) { //TBD: should wrap the IConnectionStringDictionary IConnectionStringDictionary conectionStringBuilder = base.GetConnectionStringBuilder(connectionString); OleDbSqlHelper.InitConnectionStringBuilder(conectionStringBuilder); string port = (string)conectionStringBuilder [Port]; if (port == null || port.Length == 0) { port = GetMSSqlPort(OleDbSqlHelper.GetInstanceName(conectionStringBuilder, DefaultInstanceName), OleDbSqlHelper.GetDataSource(conectionStringBuilder), OleDbSqlHelper.GetTimeout(conectionStringBuilder, DefaultTimeout)); conectionStringBuilder.Add(Port, port); } return(conectionStringBuilder); }
public override IConnectionStringDictionary GetConnectionStringBuilder(string connectionString) { IConnectionStringDictionary connectionStringBuilder = base.GetConnectionStringBuilder(connectionString); string hostname = (string)connectionStringBuilder[Hostname]; string port = null; if (hostname == null || hostname.Length == 0) { string location = (string)connectionStringBuilder[Location]; if (location != null) { int semicolumnIndex = location.IndexOf(':'); if (semicolumnIndex != -1) { hostname = location.Substring(0, semicolumnIndex); port = location.Substring(semicolumnIndex + 1); } else { hostname = location; } if (hostname != null) { connectionStringBuilder.Add(Hostname, hostname); } if (port != null) { connectionStringBuilder[Port] = port; } } } port = (string)connectionStringBuilder [Port]; if (port == null || port.Length == 0) { port = (string)ProviderInfo [Port]; connectionStringBuilder.Add(Port, port); } return(connectionStringBuilder); }
internal static void InitConnectionStringBuilder(IConnectionStringDictionary conectionStringBuilder) { if (!conectionStringBuilder.Contains("jndi-datasource-name")) { string database = (string)conectionStringBuilder [Database]; if (database == null) { conectionStringBuilder.Add(Database, String.Empty); } string dataSource = GetDataSource(conectionStringBuilder); string instanceName = GetInstanceName(conectionStringBuilder, null); if (instanceName != null) { conectionStringBuilder [ServerName] = dataSource + "\\" + instanceName; } else { conectionStringBuilder [ServerName] = dataSource; } } }
public override java.sql.Connection GetConnection(IConnectionStringDictionary conectionStringBuilder) { return(new SqlServer2005Connection(base.GetConnection(conectionStringBuilder))); }
public override java.sql.Connection GetConnection(IConnectionStringDictionary conectionStringBuilder) { return new OracleConnection(base.GetConnection (conectionStringBuilder)); }
internal JdbcUrlConnector (GenericProvider provider, IConnectionStringDictionary keyMapper) { _provider = provider; _keyMapper = keyMapper; }
public virtual java.sql.Connection GetConnection (IConnectionStringDictionary conectionStringBuilder) { string dataSourceJndi = (string) conectionStringBuilder.GetValue ("jndi-datasource-name"); if (dataSourceJndi != null && dataSourceJndi.Length > 0) { string namingProviderUrl = (string) conectionStringBuilder.GetValue ("naming-provider-url"); string namingFactoryInitial = (string) conectionStringBuilder.GetValue ("naming-factory-initial"); DataSource ds = _dataSourceCache.GetDataSource(dataSourceJndi,namingProviderUrl,namingFactoryInitial); return ds.getConnection(); } JdbcUrlConnector connector = new JdbcUrlConnector (this, conectionStringBuilder); return connector.Connection; }
internal static void InitConnectionStringBuilder (IConnectionStringDictionary conectionStringBuilder) { if (!conectionStringBuilder.Contains("jndi-datasource-name")) { string database = (string) conectionStringBuilder [Database]; if (database == null) conectionStringBuilder.Add (Database, String.Empty); string dataSource = GetDataSource (conectionStringBuilder); string instanceName = GetInstanceName (conectionStringBuilder, null); if (instanceName != null) conectionStringBuilder [ServerName] = dataSource + "\\" + instanceName; else conectionStringBuilder [ServerName] = dataSource; } }
public override java.sql.Connection GetConnection(IConnectionStringDictionary conectionStringBuilder) { return new SqlServer2005Connection (base.GetConnection (conectionStringBuilder)); }
internal JdbcUrlConnector(GenericProvider provider, IConnectionStringDictionary keyMapper) { _provider = provider; _keyMapper = keyMapper; }