Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Table Restructure

2 views
Skip to first unread message

Doug Howe

unread,
Jun 13, 2005, 4:36:41 PM6/13/05
to
Does anyone know an easy way to restructure a table using ObjectPal, so that
the restructure does nothing more that rearrange the order of fields in a
table? I thought I would be able to rearrange them by setting the
_Invariant Field ID when doing a restructure (see below), but this has no
effect on the table when run. Thanks, Doug.

tblVar.attach("dstTemp.db")
tblVar.enumFieldStruct("field_struct.db")

tcFlds.open("field_struct.db")
tcFlds.edit()

scan tcFlds:
if tcFlds."Field Name" = "ed_id" then
tcFlds."_Invariant Field ID" = 1
endif

if tcFlds."Field Name" = "src_prim_key" then
tcFlds."_Invariant Field ID" = 2
endif

if tcFlds."Field Name" = "src_id" then
tcFlds."_Invariant Field ID" = 3
endif
endscan

tcFlds.endEdit()
tcFlds.close()

dynNewStru["FIELDSTRUCT"] = "field_struct.db"
tblVar.restructure(dynNewStru)


0 new messages