Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Adding new user to Security Tables
Message
De
20/02/2006 12:47:39
 
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Titre:
Adding new user to Security Tables
Versions des environnements
Environment:
C# 2.0
OS:
Windows XP SP2
Database:
Visual FoxPro
Divers
Thread ID:
01097557
Message ID:
01097557
Vues:
54
All;

I am building a Web Forms Application that uses VFP tables for the data source. When I added security to my Web Forms Application, I copied the security tables from the VFP Samples provided with MM 2.0 to my data folder. Now I am trying to use the User and Role Administration form to add some new users to the security tables. When I try to add a new user I get the following error and trace stack:
[OleDbException (0x80004005): Field USERPK is read-only]
   System.Data.Common.DbDataAdapter.UpdatedRowStatusErrors(RowUpdatedEventArgs rowUpdatedEvent, BatchCommandInfo[] batchCommands, Int32 commandCount) +200
   System.Data.Common.DbDataAdapter.UpdatedRowStatus(RowUpdatedEventArgs rowUpdatedEvent, BatchCommandInfo[] batchCommands, Int32 commandCount) +104
   System.Data.Common.DbDataAdapter.Update(DataRow[] dataRows, DataTableMapping tableMapping) +3042
   System.Data.Common.DbDataAdapter.UpdateFromDataTable(DataTable dataTable, DataTableMapping tableMapping) +70
   System.Data.Common.DbDataAdapter.Update(DataSet dataSet, String srcTable) +293
   OakLeaf.MM.Main.Data.mmDataAccessOleDb.SaveDataSet(DataSet ds, String tableName, String primaryKeyName, Boolean retrieveAutoIncrementPK, IDbDataAdapter dbAdapter) +1696
   OakLeaf.MM.Main.Business.mmBusinessObject.SaveDataSet(DataSet ds, String tableName, String databaseKey, IDbDataAdapter dbAdapter) +1063
   OakLeaf.MM.Main.Business.mmBusinessObject.SaveDataSet(DataSet ds, String tableName, String databaseKey) +62
   OakLeaf.MM.Main.Business.mmBusinessObject.SaveDataSet(DataSet ds, String tableName) +84
   OakLeaf.MM.Main.Business.mmBusinessObject.SaveDataSet(String tableName) +71
   OakLeaf.MM.Main.Business.mmBusinessObject.SaveRow() +97
   UserAdmin.SaveUser(Object UserPk) in c:\clients\SCI1\SCI WebForm Application\Admin\UserAdmin.aspx.cs:119
   UserAdmin.btnSave_Click(Object sender, EventArgs e) in c:\clients\SCI1\SCI WebForm Application\Admin\UserAdmin.aspx.cs:232
   System.Web.UI.WebControls.Button.OnClick(EventArgs e) +96
   System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +116
   System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +31
   System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +32
   System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +72
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3839
I can login to my App using the 'MM' user id so I know that the tables are being used to verify security. So, How can I fix the sample tables so that I can use them to manage the users and roles for my application?

Thanks,
David "Doc" Herbert
Source Consulting Inc.
email: dave@2sci.com
Répondre
Fil
Voir

Click here to load this message in the networking platform