In Microsoft Access , is it possible somehow to get a list (via a SQL query ) of all columns that have UNICODE compression enabled ? Maybe by executing a query on some Microsoft Access system table ? Any ideas ?
+1
A:
Unfortunately no there is no way via a SQL call unless you use something like OleDbConnection.GetOleDbSchemaTable.
You can determine if Unicode compression is set by seeing if the field object contains a Property called UnicodeCompression
. So, something along the lines of:
Public Sub HasUnicodeCompression( field As DAO.Field )
Dim oProperty As DAO.Property
For Each oProperty In field.Properties
If oProperty.Name = "UnicodeCompression" Then
HasUnicodeCompression = True
Goto CleanUp
End If
Next oProperty
HasUnicodeCompression = False
CleanUp:
Set oProperty = Nothing
End Sub
Thomas
2010-07-24 01:01:06
@MadSeb If you are going to use this to get the fields (columns) with unicode compression, you may as well take the extra step of changing the value here. In general, it is best to use DAO rather than ADO with Access when working with tables, you can do a lot more.
Remou
2010-07-24 08:16:16