惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

P
Proofpoint News Feed
博客园 - 聂微东
Application and Cybersecurity Blog
Application and Cybersecurity Blog
MyScale Blog
MyScale Blog
罗磊的独立博客
H
Help Net Security
L
LangChain Blog
T
Threat Research - Cisco Blogs
量子位
S
Securelist
Last Week in AI
Last Week in AI
L
Lohrmann on Cybersecurity
T
The Exploit Database - CXSecurity.com
P
Privacy International News Feed
The Hacker News
The Hacker News
Vercel News
Vercel News
D
Darknet – Hacking Tools, Hacker News & Cyber Security
C
Cybersecurity and Infrastructure Security Agency CISA
T
The Blog of Author Tim Ferriss
T
Threatpost
Security Latest
Security Latest
P
Palo Alto Networks Blog
Microsoft Security Blog
Microsoft Security Blog
NISL@THU
NISL@THU
F
Full Disclosure
WordPress大学
WordPress大学
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
Stack Overflow Blog
Stack Overflow Blog
C
Check Point Blog
Hacker News - Newest:
Hacker News - Newest: "LLM"
酷 壳 – CoolShell
酷 壳 – CoolShell
H
Heimdal Security Blog
J
Java Code Geeks
Recorded Future
Recorded Future
Hugging Face - Blog
Hugging Face - Blog
G
GRAHAM CLULEY
Know Your Adversary
Know Your Adversary
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
阮一峰的网络日志
阮一峰的网络日志
U
Unit 42
B
Blog RSS Feed
月光博客
月光博客
C
Cisco Blogs
V
Visual Studio Blog
D
DataBreaches.Net
H
Hacker News: Front Page
博客园 - 叶小钗
N
News and Events Feed by Topic
爱范儿
爱范儿
A
Arctic Wolf

博客园 - dannyr|一个都不能少!

DipperRiver.Net通信协议设计 计划开发memcache 的.net版本,命名DipperRiver.Net Net1.1添加目录共享,并设置访问权限 生命诚可贵 如何关闭子线程?征集析构函数与多线程的讨论! function object(functor) ... Dev GridControl的Outlook风格定制 WinForm MDI动态加载form DevExpress's tip 检测浏览器类型的js Spry1.4 下载 Spry PreRelease 1.4 发布 Spry Framework入门(五)——数据集过滤及淡入淡出效果 Flex2.0文件上传功能(Flex2.0正式版) 关于JSON Spry Framework入门(四)——XML数据集排序 Spry Framework入门(三)——框架结构 Spry Framework入门(二)——XML数据集及主从表显示 Spry Framework入门(一)——XML数据集及显示
Access数据库的文本、备注数据类型的COLUMN_FLAGS说明
dannyr|一个都不能少! · 2008-05-22 · via 博客园 - dannyr|一个都不能少!

Access数据库对于文本和备注类型的数据类型定义(DATA_TYPE)都是为130,无法直接区分,找了N多网页,包括MSDN都没有描述有关COLUMN_FLAGS的说明,还是自己分析一下:

    COLUMN_FLAGS为64位(8字节)的十六进制的值,组合了数据类型和必填字段等信息

其中最后2个字节有效,最后一个字节一直为0x0A,有变化的是最后第二个字节,即:
    对于文本类型的为0x00;备注类型为0x80;
    对于非必填字段为0x40;必填字段为0x60

组合后:
   文本必填:  0x6A
   文本非必填:0x4A
   备注必填:  0xEA
   备注非必填:0xCA
   
最后可以得到COLUMN_FLAGS右移7位后可以区分文本类型和备注类型

DataTable dt = m_OLEDBCon.GetOleDbSchemaTable(
    OleDbSchemaGuid.Columns,
    new object[] {null, null, "表名称", null});

DataRow[] drs = dt.Select("COLUMN_NAME='字段名称'");
if(drs.Length > 0 && Convert.ToInt32(drs[0]["DATA_TYPE"]) == 130) {
    //文本类型
    if ( (Convert.ToInt64(drs[0]["COLUMN_FLAGS"]) >> 7) == 1){
        //=1为备注字段       
    }else{
        //=0为文本字段
    }
}