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.