如何获取MS Access数据类型的列表? [英] How do you get a list of MS Access data types?

查看:256
本文介绍了如何获取MS Access数据类型的列表?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图在C#程序的组合框中列出Microsoft Access 2000-2007(取决于MS Access数据库版本)的数据类型。如何实现这样的事情?

解决方案

我不认为有可能在运行时询问引擎枚举它支持的数据类型。例如,DAO不会显示一些Jet 4.0数据类型,例如 NCHAR BINARY ; ADO将揭示Access数据库引擎从未支持的数据类型;只有ACEDAO会显示多值类型。



我想你需要提前知道每个版本的引擎支持的数据类型,然后在运行时选择适当的集合。 p>

Jet 4.0数据类型(Access2000到2003包括)和各种同义词可以在这里(还应该提供一些关于Jet 4.0的新特性的提示,以防你需要支持引擎的早期版本) 。



ACE(Access2007)添加了附件类型;还支持多值(复杂)类型以支持SharePoint列表:我认为您需要自己决定多值类型是不同类型还是仅仅是现有类型的变体。 Access2007帮助中有一些详细信息。


I am trying to list data types from Microsoft Access 2000-2007 (depending on the MS Access database version) in a combobox for a C# program. How can I achieve such a thing?

解决方案

I don't think it is possible to interrogate the engine at run time to enumerate the data types it supports. For example, DAO will not reveal some of the Jet 4.0 data types such as NCHAR and BINARY; ADO will reveals data types that the Access database engine has never supported; only ACEDAO will reveal multivalued types.

I think you need to know in advance the data types each version of the engine supports then select the appropriate set at run time.

Jet 4.0 data types (Access2000 to 2003 inclusive) and the various synonyms can be found here (should also give some hints about which types are new to Jet 4.0, just in case you need to support earlier versions of the engine).

ACE (Access2007) added an Attachment type; also multivalued ("complex") types in order to support SharePoint lists: I think you will need to decide for yourself whether multivalued types are distinct types or merely variations on existing types. There are some details in the Access2007 Help.

这篇关于如何获取MS Access数据类型的列表?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆