Import Tables & Table Permissions

Meltdown

Registered User.
Local time
Today, 22:43
Joined
Feb 25, 2002
Messages
472
I need to import the tables from a secure database into a new database, is there any way to keep the table permissions that are set in the secure database, they seem to be lost in the import.
 
No, I doubt it, But what about the reverse, import everything you need into the database that has the permissions set?
 
Thanks for the reply Uncle Gizmo, I had thought of that, but I'd be worse off, I'd lose the permissions on all the forms, reports and queries.

It seems such a simple thing but it's a bloody nuisance.

Regards
 
Unless you are using the same EXACT .MDW file, you can't do this very easily. The ID number that is one of the things you can set in the User and Group Accounts Dialog Box is used as a key/tag for the permission. If you change .MDW files, you also have to back-convert the security info to use names except for the actual permissions mask.

However, the Users and Groups collections appended to each securable object can be enumerated in a For Each xxxx in yyyy loop to include a name for the user or group ( xxx.name works ) and the permission codes can be copied as a LONG. You would have to figure out the format for transmitting this information, perhaps in a temp table, but then you could try imposing the same LONG value on the destination by object name and user or group name. I believe .AddNew works in those collections, too.
 

Users who are viewing this thread

Back
Top Bottom