如何获取特定版本的MS Access或/和每个版本的MS Access的所有数据类型? [英] How can I get all the data types specific for a certain version of MS Access or/and every versions of MS Access?

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

问题描述

我试图在C#程序的组合框中列出Microsoft Access 2000-2007中的数据类型(取决于MS Access数据库版本)。我希望我的程序能够打开MS Access 2000-2007数据库。如果我打开MS Access 2003,我希望我的程序能够使用任何特定于MS Access 2003的数据的数据类型,并在组合框中列出这些数据类型。如果我打开一个MS Access 2007数据库,它将是任何数据的MS Access 2007的数据类型...我想知道是否我可以使用ACEDAO为(ACEDAO只兼容MS Access 2007?此外,如何获得特定版本的MS Access或/和每个版本的MS Access(2000-2007在我的情况下)的所有数据类型?

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. I want my program to be capable of opening MS Access 2000-2007 databases. If I open a MS Access 2003 I wish my program to be capable of using the datatypes of any data specific to MS Access 2003 and list those data types in a combobox. If I open a MS Access 2007 database it will be for datatypes of any data for MS Access 2007... I was wondering if I could use ACEDAO for that (is ACEDAO only compatible for MS Access 2007?). Also, how can I get all the data types specific for a certain version of MS Access or/and every versions of MS Access (2000-2007 in my case)?

推荐答案

ACEDAO向后兼容所有以前版本的Jet。但是兼容性以不同的方式提供。例如,如果直接查看ACEDAO的对象模型,您将看到Field数据类型和Field2数据类型。在Access 2007中,您没有看到。我的猜测是,字段数据类型是用于MDB(Jet 4和更早版本),而Field2数据类型是用于ACCDB,因为ACCDB有新的数据类型,具有早期字段类型缺少的属性和方法。

ACEDAO is backwardly compatible with all previous versions of Jet. But the compatibility is provided in different ways. For instance, if you look directly at the object model of ACEDAO, you'll see that there's both a Field data type and a Field2 data type. Within Access 2007, you don't see that. My surmise is that the Field data type is for MDBs (Jet 4 and earlier), and the Field2 data type is for ACCDB, because the ACCDB has new data types that have properties and methods lacking in the earlier field type.

例如,Field2数据类型具有AppendOnly属性,用于仅追加备忘录字段,ACE中的新功能。另一个新属性是IsComplex,我猜测是支持新的多值数据类型。还有LoadFromFile和SaveToFile方法,我不认识的目的。

For instance, the Field2 data type has the AppendOnly property that is used in append-only memo fields, a new feature in ACE. Another new property is IsComplex, which I'm guessing is there to support the new multi-value data type. There's also LoadFromFile and SaveToFile methods that I don't recognize the purpose of.

现在,这只是DAO库中的一个对象,其中有取决于什么文件格式您正在使用。我没有找到其他这样的变化,但他们可能在那里。

Now, that's just one object in the DAO library where there are variations depending on what file format you're using. I haven't looked for other such variations, but they might be there.

因此,你仍然需要知道应用于不同的版本,即使ACEDAO是将给你一个超集,将能够操作所有的旧版本。如果你只需要使用ACCDB和Jet 4 MDB,我会认为ACEDAO就足够了。

So, you'd still need to know what applied to different versions, even though ACEDAO is going to give you a superset that will be able to operate on all older versions. If you only need to work with ACCDB and Jet 4 MDBs, I'd think ACEDAO is going to suffice.

但是,我只是根据我的理解猜测它是你想做的。

But, I'm just guessing based on what I understand it is that you want to do.

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

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