Re: ADOX in vb6 and access97




"Ricardo Furtado" <RicardoFurtado@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in
message news:1C698A54-4074-4E45-89AC-4829A5CE1EA8@xxxxxxxxxxxxxxxx
The 'Alter Table' was my first choice (last friday), but for what i've
studied, it doesn't make it possible to change all these properties. It
only
allows me to change the type, size and if it allows NULLs or not.
i've tried another aproach, i guess might be the one you said
I've created a column
Dim colss As ADOX.Column
Set colss = New ADOX.Column

I've changed all the propertie
and at the end i try to insert the column
tabelaDestino.Columns.Append colss

but as you might guess, i have to delete the existing column first.
Deleting the column might be a problem, because i have records in these
databases/tables/fields and some are Autonumber fields that are referenced
in
other columns


"Ralph" wrote:


This isn't specific to your problem, but while we are on the subject, there
is a "Gotcha" that you can run into when creating a new Field. Some
properties are not available until after the Field is created. In other
words, you often have to create the Field then circle back and set
additional properties.

When using DAO make sure you piddle with the TableDef and not recordsets.
Also always use DAO constants. (they look similar to ADOX and ADO constants
and if you have been playing with both, it is an easy mistake to make.)

Dim db As DAO.Database
Dim tdf As


.


<ul