My app uses a FE and BE. Users can switch between jobs (BE) and do so quite
frequently. A Function deletes attached tables and attaches tables of the
selected BE.
Now I have added fields to one of the tables in the BE. I need to be able
to check the BE that the user is attempting to attach and if it is from a
previous version (fewer fields in table job_info), and add the new fields to
the old BE so that it is compatible with the latest version.
How would I check a table of a BE that is about to be linked to, to see if
the number of fields is less than a specified number (ei. table in old
backends have 12 fields, table in new backends have 18 fields).
Dave - 26 Aug 2005 19:40 GMT
personally i create a table in the be that has a revision counter in it that
i can check and apply whatever changes are needed from that revision on
up... since changes could include removing columns or just changing column
formats that would be hard to check. after the be is updated i just save a
new revision number in the one row in the revision status table.
> My app uses a FE and BE. Users can switch between jobs (BE) and do so
> quite
[quoted text clipped - 10 lines]
> the number of fields is less than a specified number (ei. table in old
> backends have 12 fields, table in new backends have 18 fields).
Paul Overway - 26 Aug 2005 21:16 GMT
I create a custom property on the back end database object, i.e.,
db.Properties.Append db.CreateProperty("MyDBVersion", dbText,"1.5a")
Then during startup, I inspect that property...
If Val(db.Properties("MyDBVersion")) < 1.5 Then
'Oops...wrong front end
End if
I prefer this to a table, just on the off chance that a user might change
the value in a table...this makes it a little more difficult for them to do
so.

Signature
Paul Overway
Logico Solutions, LLC
www.logico-solutions.com
> My app uses a FE and BE. Users can switch between jobs (BE) and do so
> quite
[quoted text clipped - 10 lines]
> the number of fields is less than a specified number (ei. table in old
> backends have 12 fields, table in new backends have 18 fields).