zoukankan      html  css  js  c++  java
  • 用adox 取 access 自增列

    百度很久 最后在 (.NET2.0下用ADOX动态创建ACCESS数据库(C#))

    http://blog.csdn.net/black4371/article/details/4423739 找到了

    public string getAutoIncrement(string tablename, string con)
            {
                ADOX.Catalog catalog = new Catalog();
                catalog.let_ActiveConnection(con);
                ADOX.Table tbl = new ADOX.Table();
                Tables tbs = catalog.Tables;
                foreach (Table tb in tbs)
                {
                    string str = tb.Name;
                    if (tablename == tb.Name)
                    {
                        foreach (Column col in tb.Columns)
                        {
                            if (col.Properties["AutoIncrement"].Value == true)
                                return col.Name.ToString();
                        }
                    }
                }
                return "";
            }
        }

    ADOX column properties   http://blog.163.com/akins@126/blog/static/47553796200981132124412/
    -----------------------------------
    Autoincrement
    Description
    "Nullable"
    "Fixed Length"
    "Seed"
    "Increment"
    "Jet OLEDB:Column Validation Text"
    "Jet OLEDB:Column Validation Rule"
    "Jet OLEDB:IISAM Not Last Column"
    "Jet OLEDB:AutoGenerate"
    "Jet OLEDB:One BLOB per Page"
    "Jet OLEDB:Compressed UNICODE Strings"
    "Jet OLEDB:Allow Zero Length"
    "Jet OLEDB:Hyperlink"

    -------------------------------------------------

    ado如何取得表的所有字段信息?《VBA》

    http://access911.net/fixhtm/74FAB11E10DC.htm?tt=

  • 相关阅读:
    静态化之优化
    SEO小技巧
    apache 工具和简单优化
    apache rewrite机制
    nginx php win平台配置
    mvc 简单模型
    php无限分类三种方式
    【转】sqlserver查询数据库中有多少个表
    【转】sqlserver数据库之间的表的复制
    SET ANSI_NULLS (TransactSQL)
  • 原文地址:https://www.cnblogs.com/ccqin/p/3367554.html
Copyright © 2011-2022 走看看