G
Guest
Hi,
I am attempting to change an Access 2000 mdb's field's AllowZeroLength
property to true using .Net 1.1 SP1 and having trouble getting it to work.
It seems that I am not adding the updated column to the catalog, and am not
sure how to do this. Any help would be greatly appreciated!
ADOX.CatalogClass thisCatalog;
ADOX.TableClass thisTable;
try
{
thisCatalog = new ADOX.CatalogClass();
thisCatalog.ActiveConnection = strAccessConn + "Jet OLEDB:Engine Type=5;";
// Type=5 => Access 2000 format
thisTable = new ADOX.TableClass();
thisTable.Name = "tblGroups";
thisTable.ParentCatalog = thisCatalog;
thisTable.Columns["UserIDs"].Properties["Jet OLEDB:Allow Zero
Length"].Value = true;
}
catch(Exception ex)
{
log.WriteToLog(log.FormatExceptionDescription("ADOX Error", ex));
}
finally
{
thisCatalog = null;
thisTable = null;
}
I am attempting to change an Access 2000 mdb's field's AllowZeroLength
property to true using .Net 1.1 SP1 and having trouble getting it to work.
It seems that I am not adding the updated column to the catalog, and am not
sure how to do this. Any help would be greatly appreciated!
ADOX.CatalogClass thisCatalog;
ADOX.TableClass thisTable;
try
{
thisCatalog = new ADOX.CatalogClass();
thisCatalog.ActiveConnection = strAccessConn + "Jet OLEDB:Engine Type=5;";
// Type=5 => Access 2000 format
thisTable = new ADOX.TableClass();
thisTable.Name = "tblGroups";
thisTable.ParentCatalog = thisCatalog;
thisTable.Columns["UserIDs"].Properties["Jet OLEDB:Allow Zero
Length"].Value = true;
}
catch(Exception ex)
{
log.WriteToLog(log.FormatExceptionDescription("ADOX Error", ex));
}
finally
{
thisCatalog = null;
thisTable = null;
}