System.Data.Odbc.OdbcDataReader.OdbcDataReader.GetPrimaryKeys C# (CSharp) Méthode

GetPrimaryKeys() private méthode

private GetPrimaryKeys ( string catalog, string schema, string table ) : string[]
catalog string
schema string
table string
Résultat string[]
		private string [] GetPrimaryKeys (string catalog, string schema, string table)
		{
			if (cols.Length <= 0)
				return new string [0];

			ArrayList keys = null;
			try {
				keys = GetPrimaryKeysBySQLPrimaryKey (catalog, schema, table);
			} catch (OdbcException) {
				try {
					keys = GetPrimaryKeysBySQLStatistics (catalog, schema, table);
				} catch (OdbcException) {
				}
			}
			if (keys == null)
				return null;
			keys.Sort ();
			return (string []) keys.ToArray (typeof (string));
		}