>Clay,
>
>>Is it possible to deny a user access to Page within a TabControl?
>>
>>Or is it possible to make the Page invisible?
>
>Have you tried changing the class of the Page from TabPage to mmTabPage?
>
>Regards,
That worked, however when I click on the Generate button of the [Security Control ID setup dialog] I get the following error:
[unable to create a new security record]
I already subclassed the security objects in order to override the appropriate members to deal with Oracle. I changed the Factory.cs file and added the following:
public class Factory : OakLeaf.MM.Main.Windows.Forms.mmFactoryDesktop
{
///
/// Creates a new User business object
/// ///
User business object public override mmUser CreateUserObject()
{
return new otsUser();
}
///
/// Creates a new Role business object
/// ///
Role business object public override mmRole CreateRoleObject()
{
return new otsRole();
}
///
/// Creates a User Manager
/// ///
User Manager ///
public override mmUserManager CreateUserManager()
{
return new otsUserManager();
}
///
/// Creates a Security Manager
/// ///
Security Manager public override mmSecurityManager CreateSecurityManager()
{
return new otsSecurityManager();
}
///
/// Creates a Role Security business object
/// ///
Role Security business object public override mmRoleSecurity CreateRoleSecurityObject()
{
return new otsRoleSecurity();
}
///
/// Creates a Security business object
/// ///
public override mmSecurity CreateSecurityObject()
{
return new otsSecurity();
}
///
/// Creates a User Security business object
/// ///
User Security business object public override mmUserSecurity CreateUserSecurityObject()
{
return new otsUserSecurity();
}
Each of these ots objects are subclassed from the MM equivalent.
The Login form authenticates the user and will prevent users not in the user table from logining in. When a valid user attempts to login with the correct password I get the following message:
Parameter[0] '@USERFK' has no default value.
So I have two problems that could be related. I can't generate a GUID or Login.
Here is the call stack:
at System.Data.OleDb.OleDbCommand.ExecuteCommandTextErrorHandling(Int32 hr)
at System.Data.OleDb.OleDbCommand.ExecuteCommandTextForSingleResult(tagDBPARAMS dbParams, Object& executeResult)
at System.Data.OleDb.OleDbCommand.ExecuteCommandText(Object& executeResult)
at System.Data.OleDb.OleDbCommand.ExecuteCommand(CommandBehavior behavior, Object& executeResult)
at System.Data.OleDb.OleDbCommand.ExecuteReaderInternal(CommandBehavior behavior, String method)
at System.Data.OleDb.OleDbCommand.ExecuteReader(CommandBehavior behavior)
at System.Data.OleDb.OleDbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.FillFromCommand(Object data, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable)
at OakLeaf.MM.Main.Data.mmDataAccessOleDb.FillDataSet(DataSet ds, IDbDataAdapter dbAdapter, String tableName, Boolean clearOnFill)
at OakLeaf.MM.Main.Data.mmDataAccessOleDb.FillDataSet(DataSet ds, IDbCommand command, String tableName, Boolean clearOnFill)
at OakLeaf.MM.Main.Data.mmDataAccessOleDb.FillDataSet(DataSet ds, String command, String tableName, CommandType cmdType, IDbDataParameter[] dataParms, Boolean clearOnFill)
at OakLeaf.MM.Main.Business.mmBusinessObject.FillDataSet(DataSet ds, String command, String tableName, String databaseKey, CommandType cmdType, IDbDataParameter[] dataParams)
at OakLeaf.MM.Main.Business.mmBusinessObject.GetDataSet(String command, String tableName, String databaseKey, CommandType cmdType, IDbDataParameter[] dataParams)
at OakLeaf.MM.Main.Business.mmBusinessObject.GetDataSet(String command, String tableName, String databaseKey, IDbDataParameter[] dataParams)
at OakLeaf.MM.Main.Business.mmBusinessObject.GetDataSet(String command, String tableName, IDbDataParameter[] dataParams)
at OakLeaf.MM.Main.Business.mmBusinessObject.GetDataSet(String command, IDbDataParameter[] dataParams)
at IEI.OTS.Business.otsUserSecurity.GetUserSecurityByPK(Object userPK) in O:\OTS Business\UserSecurity.cs:line 93
at IEI.OTS.Business.otsSecurityManager.RegisterUser(Object userPK) in o:\ots business\securitymanager.cs:line 422
at IEI.OTS.Main.Windows.Forms.Security.UserLoginForm.AuthenticateUser(String userID, String password, String databaseKeyConnect, String userIDConnect, String passwordConnect) in o:\ordinancetrackingsystem\userloginform.cs:line 95
at OakLeaf.MM.Main.Windows.Forms.mmUserLoginForm.btnOK_Click(Object sender, EventArgs e)
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.PerformClick()
at System.Windows.Forms.Form.ProcessDialogKey(Keys keyData)
at System.Windows.Forms.Control.ProcessDialogKey(Keys keyData)
at System.Windows.Forms.Control.ProcessDialogKey(Keys keyData)
at System.Windows.Forms.TextBoxBase.ProcessDialogKey(Keys keyData)
at System.Windows.Forms.Control.PreProcessMessage(Message& msg)
at System.Windows.Forms.ThreadContext.System.Windows.Forms.UnsafeNativeMethods+IMsoComponent.FPreTranslateMessage(MSG& msg)
at System.Windows.Forms.ComponentManager.System.Windows.Forms.UnsafeNativeMethods+IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.RunDialog(Form form)
at System.Windows.Forms.Form.ShowDialog(IWin32Window owner)
at System.Windows.Forms.Form.ShowDialog()
at IEI.OTS.AppMainEntry.Main() in O:\OrdinanceTrackingSystem\Main.cs:line 50
--------------------------
Clay Angelly
cangelly@ie-inc.comNever argue with an idiot. They drag you down to their level and beat you with experience.