Vamos a ver, no puede ser tan difícil.
Basándome en el código inicial, y añadiendo dos columnas, una para PK y otra para un campo entero Autoincremental queda así:
Código Delphi
[-]
procedure TForm1.Button1Click(Sender: TObject);
var
Catalog : _Catalog;
Table : _Table;
BaseName : String;
DS : String;
col : _Column;
key : _Key;
begin
BaseName := 'C:\Temp\MiBaseDatos.mdb';
Catalog := CreateCOMObject(StringToGUID('ADOX.Catalog')) as _Catalog;
DS := 'Provider=Microsoft.Jet.OLEDB.4.0;Data Source='+BaseName;
If FileExists(BaseName) Then begin
DeleteFile(BaseName);
end;
Catalog.Create(DS);
Table := CreateCOMObject(StringToGUID('ADOX.Table')) as _Table;
Table.Name := 'MiTabla';
Catalog.Tables.Append(Table);
Table.Columns.Append('Nombre', adVarWChar, 128);
Table.Columns.Append('Apellido', adVarWChar, 128);
col := CoColumn.Create;
col.ParentCatalog := Catalog;
col.Name := 'Auntoincremental';
col.Type_ := adInteger;
col.Properties['AutoIncrement'].Value := True;
Table.Columns.Append(col, adInteger, col.DefinedSize);
col := CoColumn.Create;
col.ParentCatalog := Catalog;
col.Name := 'ClavePrimaria';
col.Type_ := adInteger;
Table.Columns.Append(col, adInteger, col.DefinedSize);
Key := CoKey.Create;
Key.Name := 'ClavePrimaria';
Key.Type_ := adKeyPrimary;
Key.Columns.Append('ClavePrimaria', adInteger, 0 );
Table.Keys.Append(Key, 0, EmptyParam, Unassigned, Unassigned);
end;
Añade al uses ADOX_TLB y ComObj.
A mi me crea la tabla perfectamente con los 4 campos.
Pruébalo y dime algo.
La prueba "del delito".