66114

How can I get all the data types specific for a certain version of MS Access or/and every versions o

Question:

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)?

Answer1:

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.

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.

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.

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.

Answer2:

As far as I can tell the ACEDAO version of DataTypeEnum lists all data types that have everr been available (though you'd have to look for a variation of dbMemo to be able to distinguish a Hyperlink if you consider this to be a distinct data type.

However, it also lists additional types it seemingly does not support: dbfloat (21) as distinct from dbDouble (7); dbTime (22) as distinct from dbDate (8); dbNumeric (19) as distinct from dbDouble (20); distinct types for dbVarBinary, dbBinary and dbLongBinary.

Also, I don't think it is possible to interrogate a particular version of the engine at run time to enumerate the data types supports.

Therefore, I don't think simply listing the types from ACEDAO enumeration will be very useful. Rather, 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 <a href="http://msdn.microsoft.com/en-us/library/aa140015(office.10).aspx" rel="nofollow">here</a>; it should also give some hints about which types are new to Jet 4.0 i.e. to help you support earlier versions of the engine.

ACE (Access2007) added an <a href="http://office.microsoft.com/en-gb/access/HA012138521033.aspx" rel="nofollow">Attachment type</a>; it also added <a href="http://office.microsoft.com/en-gb/access/HA100140981033.aspx" rel="nofollow">multivalued ("complex") types</a> which you will need to decide for yourself whether these are distinct types (or merely variations on existing data types) based on what you are trying to achieve.

Recommend

  • ODBC for mdb/accdb: Error Code 193
  • How to use ADOX to connect to existing Access database
  • Calculated values using Angular FormArray
  • How to handle screen rotation/orientation in Xamarin Forms?
  • Export data from Excel to Access using VBA
  • Displaying inference tree node values with “print”
  • How to list all the bucket types in riak?
  • How to modify search result page given by Solr?
  • How To Delete All Words After X Characters
  • Removing event listeners on automatically created multiple elements
  • MS Access - How to change the linked table path by amend the table
  • gspread or such: help me get cell coordinates (not value)
  • How do I exclude a dependency in provided scope when running in Maven test scope?
  • How to use RequestBodyAdvice
  • Q promise. Difference between .when and .then
  • Using variable in a value field in jMeter
  • Linq Objects Group By & Sum
  • Retrieving value from sql ExecuteScalar()
  • Azure Cloud Service Web Role web pages do not load
  • How to make a tree having multiple type of nodes and each node can have multiple child nodes in java
  • swift auto completion not working in Xcode6-Beta
  • Finding past revisions of files in StarTeam w/ .NET SDK / C#
  • Incrementing object id automatically JS constructor (static method and variable)
  • Does CUDA 5 support STL or THRUST inside the device code?
  • When should I choose bucket sort over other sorting algorithms?
  • Hazelcast - OperationTimeoutException
  • To display the title for the current loaction in map in iphone
  • Akka Routing: Reply's send to router ends up as dead letters
  • AT Commands to Send SMS not working in Windows 8.1
  • Cannot Parse HTML Data Using Android / JSOUP
  • KeystoneJS: Relationships in Admin UI not updating
  • Rails 2: use form_for to build a form covering multiple objects of the same class
  • C# - Getting references of reference
  • Hits per day in Google Big Query
  • How do I configure my settings file to work with unit tests?
  • Is it possible to post an object from jquery to bottle.py?
  • Checking variable from a different class in C#
  • Why is Django giving me: 'first_name' is an invalid keyword argument for this function?
  • Binding checkboxes to object values in AngularJs
  • How can I use `wmic` in a Windows PE script?