Connecting to Security Data


Author
Message
Christopher Smith
Christopher Smith
StrataFrame Beginner (4 reputation)StrataFrame Beginner (4 reputation)StrataFrame Beginner (4 reputation)StrataFrame Beginner (4 reputation)StrataFrame Beginner (4 reputation)StrataFrame Beginner (4 reputation)StrataFrame Beginner (4 reputation)StrataFrame Beginner (4 reputation)StrataFrame Beginner (4 reputation)
Group: Forum Members
Posts: 4, Visits: 59
Hello-

I too, am having some difficulty interpreting how to connect properly. I have created a small app without using security and it works so far in my tests (creating and using the BO's on forms). However, when using the security functions in another small app , I receive the above error. I have used the connection wizard to point to the SF database and I coded in my database name in program.cs to use my application data in my database (both on the same server). (Which works in the app not using security). Do you have to use the DTT to put the security tables into my database during development? 

Thank you.

SqlException
  Invalid object name 'dbo.SFSPreferences'.

Source     : .Net SqlClient Data Provider

Stack Trace:
   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
   at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
   at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
   at System.Data.SqlClient.SqlDataReader.ConsumeMetaData()
   at System.Data.SqlClient.SqlDataReader.get_MetaData()
   at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
   at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)
   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)
   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
   at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
   at System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior)
   at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior)
   at System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
   at System.Data.Common.DbDataAdapter.Fill(DataTable[] dataTables, Int32 startRecord, Int32 maxRecords, IDbCommand command, CommandBehavior behavior)
   at System.Data.Common.DbDataAdapter.Fill(DataTable dataTable)
   at MicroFour.StrataFrame.Data.DbDataSourceItem.GetDataTable(DbCommand Command, OnChangeEventHandler CallBack)
   at MicroFour.StrataFrame.Data.SqlDataSourceItem.GetDataTable(DbCommand Command, OnChangeEventHandler CallBack)
   at MicroFour.StrataFrame.Data.DataLayer.GetDataTable(DbCommand Command, Boolean RegisterNotification)
   at MicroFour.StrataFrame.Business.BusinessLayer.FillDataTable(DbCommand CommandToExecute)
   at MicroFour.StrataFrame.Security.BusinessObjects.SFSPreferencesBO.FillAll(Int32 ProjectPK)
   at MicroFour.StrataFrame.Security.BusinessObjects.SFSPreferencesBO.RetrieveSecurityPreferences()
   at LumInvSys.Program.InitApplication(InitializingApplicationEventArgs e) in C:\MyProjects\LumInvSys\LumInvSys\Program.cs:line 161
   at MicroFour.StrataFrame.Application.StrataFrameApplication.Raise_InitializingApplication(InitializingApplicationEventArgs e)
   at MicroFour.StrataFrame.Application.StrataFrameApplication.RunApplication()
   at LumInvSys.Program.Main() in C:\MyProjects\LumInvSys\LumInvSys\Program.cs:line 40
   at System.AppDomain.nExecuteAssembly(Assembly assembly, String[] args)
   at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
   at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
   at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.ThreadHelper.ThreadStart()

Greg McGuffey
Greg McGuffey
Strategic Support Team Member (3.4K reputation)
Group: Forum Members
Posts: 2K, Visits: 6.6K
The answer is yes, you need to deploy the security tables to a database during development (just like your app tables need to be deployed during development). The DDT is the easiest way to do this. You can deploy to the same database as your app or a different one. Using the same is the simplest.



Note that the StrataFrame database is used by the design time environment and used at runtime. You shouldn't ever connect to this database at runtime. You set this connection in the SF menu within VS.



Good luck!
Christopher Smith
Christopher Smith
StrataFrame Beginner (4 reputation)StrataFrame Beginner (4 reputation)StrataFrame Beginner (4 reputation)StrataFrame Beginner (4 reputation)StrataFrame Beginner (4 reputation)StrataFrame Beginner (4 reputation)StrataFrame Beginner (4 reputation)StrataFrame Beginner (4 reputation)StrataFrame Beginner (4 reputation)
Group: Forum Members
Posts: 4, Visits: 59
Thanks Greg.

Chris

Greg McGuffey
Greg McGuffey
Strategic Support Team Member (3.4K reputation)
Group: Forum Members
Posts: 2K, Visits: 6.6K
Any time! BigGrin
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search