I'm trying to create a script to automatically grant select,update,delete,insert on tables to specific users.
Dim ModelTables, table, tab, newPerm
SET ModelTables = obj.Tables
For Each table in ModelTables
If IsObject(table) Then
Set tab = table
'Testing just on one table
If InStr(tab.Name, "MY_TEST_TABLE")=1 Then
set newPerm = tab.Permissions.createNew()
'-- this is all I managed to create
End If
End if
Next
This is all I managed to create. I don't know the structure of a Permission. I'm also totaly new to VB. Can somebody support me with a hint / proper code / documentation, please?