DerFarm
Programmer
- Mar 10, 2003
- 25
Access ver 2003 sp2
the variables are properly typed,
the DstDB is actually created just prior to execution
I'm sure the code worked in prior versions, but I can't for the life of me figure out why the append is not working correctly.
Can anyone see something stupendously stupid that I'm doing?
Thanx
the variables are properly typed,
the DstDB is actually created just prior to execution
I'm sure the code worked in prior versions, but I can't for the life of me figure out why the append is not working correctly.
Can anyone see something stupendously stupid that I'm doing?
Thanx
Code:
Conn.Open BuildConnectionString(DstDB)
Set Cat.ActiveConnection = Conn
ThisTable.Name = "NearTo"
ThisTable.ParentCatalog = Cat
'first build the column to hold the data
ThisColumn.Name = srcvar
ThisColumn.Type = adDouble
ThisTable.Columns.Append ThisColumn
ThisTable.Columns.Item(ThisColumn.Name).Properties("Nullable") = adColNullable
Set ThisColumn = Nothing
'build the autoincrement var
ThisColumn.Name = "OriginalRank"
ThisColumn.Type = 3
ThisTable.Columns.Append ThisColumn
ThisTable.Columns.Item(ThisColumn.Name).Properties("AutoIncrement") = True
Set ThisColumn = Nothing
Cat.Tables.Append ThisTable <<<<<blows up here
Cat.Tables.Refresh
Set ThisTable = Nothing