Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Error after renaming AccessLevel column
Message
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Title:
Error after renaming AccessLevel column
Environment versions
Environment:
VB.NET 1.1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
00965780
Message ID:
00965780
Views:
58
Kevin,

It appears that the MM.NET framework imposes a limitation regarding the name of the "access level" column found in both the UserSecurity and RoleSecurity tables. Specifically, the framework generates an error message if I rename the column in the UserSecurity table as something different than the name used in the RoleSecurity table (and use the new column name in a subclass of the mmUserSecurity class).

After dismissing the login form, and during the setup of the main form, the framework generates an error message stating that the new column name is not in the RoleSecurity table.

I have tracked the source of the error to line 154 in my copy of the mmSecurityManager.cs file. The line reads as:
Level = this.ConvertAccessLevel(rows[0][this.oUserSecurity.AccessLevelField]);
In this line, the oUserSecurity.AccessLevelField property is being used with an array of DataRow objects generated from a table in the dsRoleSecurity DataSet.

Questions:

1. Should the line of code above refer to the oRoleSecurity.AccessLevelField property instead?

2. Have I missed a property setting in my subclass of mmUserSecurity? (Code below.)

Thanks,
Chris
Public Class ppmisUserSecurity
Inherits mmUserSecurity
   Public Sub New()
      Me.TableName = "UserSecurity"
      Me.PrimaryKey = "uss_ussid"
      Me.UserFKField = "uss_usrid"
      Me.SecurityFKField = "uss_secid"
      Me.AccessLevelField = "AccessLevel"
      ' Want to rename: uss_accesslevel; rss_accesslevel in RoleSecurity table
   End Sub
End Class
Christopher Bohling, Consultant
http://www.ChristopherBohling.com
Reply
Map
View

Click here to load this message in the networking platform