示例#1
0
    public static string[] GetKeyWords(string connectionString)
    {
        string[] keyWords = null;

        try
        {
            var connection = new ConnectionClass();

            connection.Open(connectionString, null, null, 0);
            var schema    = connection.OpenSchema(SchemaEnum.adSchemaDBInfoKeywords, Type.Missing, Type.Missing);
            var dataTable = OleDbHelper.Convert(schema);
            schema.Close();
            connection.Close();

            keyWords = new string[dataTable.Rows.Count];

            for (var i = 0; i < dataTable.Rows.Count; i++)
            {
                keyWords[i] = (string)dataTable.Rows[i][0];
            }
        }
        catch
        {
        }

        return(keyWords);
    }