public virtual SqlServerCollationSchemaCollection GetCollations() { SqlServerCollationSchemaCollection collations = new SqlServerCollationSchemaCollection(); using (IPooledDbConnection conn = connectionPool.Request()) { conn.DbConnection.ChangeDatabase("master"); using (IDbCommand command = conn.CreateCommand("SELECT * FROM ::fn_helpcollations()")) { try { using (IDataReader reader = command.ExecuteReader()) { while (reader.Read()) { SqlServerCollationSchema coll = new SqlServerCollationSchema(this); coll.Name = reader.GetString(0); coll.Description = reader.GetString(1); collations.Add(coll); } reader.Close(); } } catch (IOException ioex) { //FIXME: Avoid an IOException AND ObjectDisposedException (https://bugzilla.novell.com/show_bug.cgi?id=556406) } catch (ObjectDisposedException dex) { } catch (Exception e) { QueryService.RaiseException(e); } finally { connectionPool.Release(conn); } } } return(collations); }
public virtual SqlServerCollationSchemaCollection GetCollations () { SqlServerCollationSchemaCollection collations = new SqlServerCollationSchemaCollection(); using (IPooledDbConnection conn = connectionPool.Request ()) { conn.DbConnection.ChangeDatabase ("master"); using (IDbCommand command = conn.CreateCommand ("SELECT * FROM ::fn_helpcollations()")) { try { using (IDataReader reader = command.ExecuteReader ()) { while (reader.Read ()) { SqlServerCollationSchema coll = new SqlServerCollationSchema (this); coll.Name = reader.GetString (0); coll.Description = reader.GetString (1); collations.Add (coll); } reader.Close (); } } catch (IOException) { //FIXME: Avoid an IOException AND ObjectDisposedException (https://bugzilla.novell.com/show_bug.cgi?id=556406) } catch (ObjectDisposedException) { } catch (Exception e) { QueryService.RaiseException (e); } finally { connectionPool.Release(conn); } } } return collations;