Mapper Exception


Author
Message
StrataFrame Team
S
StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
When you open the "Database Connections" option under the StrataFrame menu within Visual Studio, you are not configuring the database connection for your application, but rather the database connection used by StrataFrame's design-time components (the Business Object Mapper, the Localization Editor, and the Database Deployment Toolkit).



The database connection for your application is configured within the SetDataSources() method of the "program.cs" file. In that method, you either:



1) Add RequiredDataSources and let the ConnectionManager popup a wizard asking for the connection string, or



2) Add the SqlDataSourceItem objects to the collection manually, specifying the connection string for the application when you create the SqlDataSourceItem.



If you choose option #1, then to allow the end user to change the connection string (including the username/password in the connection string), you can call MicroFour.StrataFrame.Data.ConnectionManager.ShowAvailableConnections() which will show the Database Connections dialog for your application, allowing the end-user to change the connection string.
Daniel Essin
Daniel Essin
StrataFrame User (265 reputation)StrataFrame User (265 reputation)StrataFrame User (265 reputation)StrataFrame User (265 reputation)StrataFrame User (265 reputation)StrataFrame User (265 reputation)StrataFrame User (265 reputation)StrataFrame User (265 reputation)StrataFrame User (265 reputation)
Group: Forum Members
Posts: 235, Visits: 309
I'll try that. I guess I'm still somewhat confused about the way you handle connections. For example, the connections that I add to the data layer don't seem to have usernmame or password properties or a connectionString property for that matter so I am not clear about how one would change the logon info of an existing connection.
StrataFrame Team
S
StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
The messages "Invalid object name 'DTEprojects'. Invalid object name 'DTEproject_computer_tie'." are from SQL Server stating that it cannot find those tables within the given database connection.



Verify that your database connection is currently pointing to the StrataFrame database by selecting Database Connection from the StrataFrame menu within Visual Studio and editing the database connection that has a green check.
Daniel Essin
Daniel Essin
StrataFrame User (265 reputation)StrataFrame User (265 reputation)StrataFrame User (265 reputation)StrataFrame User (265 reputation)StrataFrame User (265 reputation)StrataFrame User (265 reputation)StrataFrame User (265 reputation)StrataFrame User (265 reputation)StrataFrame User (265 reputation)
Group: Forum Members
Posts: 235, Visits: 309
I opened the Business Object Mapper and got the following:



SqlException

   Invalid object name 'DTEprojects'.

Invalid object name 'DTEproject_computer_tie'.



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.AddIns.DTEprojectsBO.FillProjects(String[] ProjectPaths)

at MicroFour.StrataFrame.AddIns.PartialClassBuilderDialog.BuildProjectNode(PartialClassBuilderVSProject Prj)

at MicroFour.StrataFrame.AddIns.PartialClassBuilderDialog.BuildTreeView()

at MicroFour.StrataFrame.AddIns.PartialClassBuilderDialog.InitForm()



I have no idea what this means.
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