StrataFrame Forum
Home      Members   Calendar   Who's On
Welcome Guest ( Login | Register )
      



SecurityDialog - Foreign Key Error (Project...Expand / Collapse
Author
Message
Posted 09/24/2007 1:11:26 PM


StrataFrame Beginner

StrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame Beginner

Group: StrataFrame Users
Last Login: 09/26/2007 11:48:20 AM
Posts: 2, Visits: 6
I have embedded the SecurityDialog in my prototype application.
When the user adds Users or Roles, a Foreign Key error is thrown (on Project Code).
Also the securityForm.ProjectPK property == 0.

The Security Key is valid (SetSecurityKeyAndVectorForUserAuthentication) -- I can authenticate users and authorize access to Forms.

Is this a configuration issue?
Can you suggest a fix?


Below: stack trace for error when adding a user:

at MicroFour.StrataFrame.Business.BusinessLayer.SaveByForm(Boolean Transactional, String TransactionKey)
at MicroFour.StrataFrame.UI.Windows.Forms.BaseForm.Save(Boolean Transactional, String TransactionKey)
at MicroFour.StrataFrame.UI.Windows.Forms.BaseForm.Save()
at MicroFour.StrataFrame.Security.UserEditor.cmdSave_Click(Object sender, EventArgs e)
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
...
Post #11654
Posted 09/24/2007 9:10:17 PM


StrataFrame Developer

StrataFrame Developer

Group: StrataFrame Developers
Last Login: Yesterday @ 4:58:13 AM
Posts: 4,379, Visits: 4,421
You do not have projects at run-time.  The ProjectPK is ONLY used through the Visual Studio designer so that you....the developer...can create projects that are deployed to your end-user.  When deployed, the projects table is not deployed and is not referenced or used.  This is for design-time purposes only.

There is really not enough of a stack trace to see the exact error.  However, I am farily confident that you do not have the SecurityDataSource pointing to the right location...or...you do not have the security tables deployed to your database.  By default the security data source will use the default data source.  So if your security tables are in the same database as your deployed database then you will not have any trouble and you do not need to set this.

When you indicate "embedded" are you just referring to calling the SecurityDialog() form through the SF reference or did you do something with the SF source code?

Any additional steps that you could provide would be helpful as well as a full stack trace.  Thanks.

Post #11664
Posted 09/25/2007 4:05:46 PM


StrataFrame Beginner

StrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame Beginner

Group: StrataFrame Users
Last Login: 09/26/2007 11:48:20 AM
Posts: 2, Visits: 6
Thanks, Trent. You were right.

I was still running locally, from the design-time "StrataFrame" database.
I now understand that, even when running locally, we need to deploy the SFS data to a runtime database -- OK!

From "the manual" -- (SecurityHelp.chm)
Without the DDT, you must manually add the SFS* tables to your database script for deployment and devise a method to deploy the contents of the SFS* tables in the StrataFrame (design-time) database to your application’s database at runtime. You only need to gather the records that match your project, identified by the appropriate record within the SFSProjects table.


I am farily confident that you do not have the SecurityDataSource pointing to the right location...or...you do not have the security tables deployed to your database.


Post #11689
« Prev Topic | Next Topic »


Reading This TopicExpand / Collapse
Active Users: 0 (0 guests, 0 members, 0 anonymous members)
No members currently viewing this topic.
Forum Moderators: Ben Chase, Trent L. Taylor, Steve L. Taylor

PermissionsExpand / Collapse

All times are GMT -6:00, Time now is 4:26am

Powered by InstantForum.NET v4.1.4 © 2008
Execution: 0.094. 9 queries. Compression Enabled.
Site Map - Home - My Account - Forum - About Us - Contact Us - Try It - Buy It

Microsoft, Visual Studio, and the Visual Studio logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries.