StrataFrame Forum

Error when trying to run the Business Object Mapper

http://forum.strataframe.net/Topic1564.aspx

By Charles Thomas Blankenship - 6/17/2006

I created a Business Object Library within the Web Solution and selected to run the Business Object Mapper ... the following error occurs.  I have also uninstalled and reinstalled SF 1.4.1 and still get the error message.  I also tried to run the Business Object Mapper from within the Example Web Application, same result.

Help!w00t

Error Message is as follows:

SqlException
 Invalid object name 'DTEprojects'.

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()

By Trent L. Taylor - 6/17/2006

CT,

Did you deploy the database structure when loading the 1.4.1 release?  We have made some structure changes that are required by the BO Mapper.  In fact, you should be having the same problem regardless of Win for Web forms.  The sample web application houses all of the business objects in a separate DLL which can be used on either platform. 

First things first, run the setup again (you can run the repair mode if you want) and make sure to deploy the database to the SQL Server instance that you use for StrataFrame.  To verify your connection in SF, click the "Database Connection..." menu item from the StrataFrame menu in Visual Studio.

Let me know. BigGrin

By Charles Thomas Blankenship - 6/17/2006

Hey bud:

I fixed that problem with a new installation of the whole thing ... now my problem is more onerous.  I need to step into the framework code so I added the StrataFrame Source Code projects to my web solution.  Now I get this error:Crying  Did I miss a step required to successfully step into strataframe code?

Error 1 The command ""C:\Documents and Settings\Administrator.CTB-XPSLAPTOP\My Documents\Visual Studio 2005\Projects\IMA\AfterBuild.bat" "C:\Program Files\MicroFour\StrataFrame Source Code\MicroFour StrataFrame Base\bin\MicroFour StrataFrame Base.dll" "C:\Program Files\MicroFour\StrataFrame Source Code\MicroFour StrataFrame Base\bin\microfour strataframe base.xml"" exited with code 9009. microfour strataframe base

Error 2 The command ""C:\Documents and Settings\Administrator.CTB-XPSLAPTOP\My Documents\Visual Studio 2005\Projects\IMA\AfterBuild.bat" "C:\Program Files\MicroFour\StrataFrame Source Code\MicroFour StrataFrame UI\bin\MicroFour StrataFrame UI.dll" "C:\Program Files\MicroFour\StrataFrame Source Code\MicroFour StrataFrame UI\bin\microfour strataframe ui.xml"" exited with code 9009. microfour strataframe ui

Error 3 The command ""C:\Documents and Settings\Administrator.CTB-XPSLAPTOP\My Documents\Visual Studio 2005\Projects\IMA\AfterBuild.bat" "C:\Program Files\MicroFour\StrataFrame Source Code\MicroFour StrataFrame Business\bin\MicroFour StrataFrame Business.dll" "C:\Program Files\MicroFour\StrataFrame Source Code\MicroFour StrataFrame Business\bin\microfour strataframe business.xml"" exited with code 9009. microfour strataframe business

Error 4 The command ""C:\Documents and Settings\Administrator.CTB-XPSLAPTOP\My Documents\Visual Studio 2005\Projects\IMA\AfterBuild.bat" "C:\Program Files\MicroFour\StrataFrame Source Code\MicroFour StrataFrame DBEngine\bin\MicroFour StrataFrame DBEngine.dll" "C:\Program Files\MicroFour\StrataFrame Source Code\MicroFour StrataFrame DBEngine\bin\microfour strataframe dbengine.xml"" exited with code 9009. microfour strataframe dbengine


 

By Trent L. Taylor - 6/17/2006

CT,

It is best not to add the SF source projects to another solution...especially web because this can cause you some frustrations...as you have seen.  Web solutions behave differently than Win solutions...this is just .NET.  To put the SF solution into a state where it can be debugged through any format, do the following:

  1. Open the SF source solution
  2. Build the solution in debug mode and make sure that all 4 assemblies built and were added to the GAC (you can tell this by looking in the Output window.
  3. Close down all Visual Studio instances
  4. Open up you web solution
  5. Remove the SF projects from the solution
  6. Remove the SF references and add them back in from the GAC (.NET page tab).  This will make sure they are no longer referencing the SF libs through the project
  7. Build your web solution in debug mode.
  8. Now when you step into an SF command, it will take you directly to the source

The errors you are getting is due to a reference in the GAC and a referenced project through the web solution.  There is a conflict and this is why you never want to bring the SF libraries into a solution.  You really don't need to when you have them in debug mode because when you step into an SF command it will automatically open the proper source file for debugging.

If you get stuck let me know and I will help you out.  Once you figure this out once it is all downhill after that Wink.

By Trent L. Taylor - 6/18/2006

CT,

I have recompiled the assemblies with the latest changes and attached them to this post.  To get your GAC and assemblies up to date, do the following:

  1. Close down all Visual Studio Instances
  2. Download the attachment
  3. Extract all of the files (XML and DLL) to the "c:\program files\common files\microfour\strataframe" folder overwriting the existing files.
  4. Open two Explorer Windows.  Navigate one to the "c:\program files\common files\microfour\strataframe" folder and the other to the "C:\Windows\Assembly" folder.
  5. From the Common Files folder (where you extracted the new files) select the MicroFour StrataFrame...: AddIns.dll, Base.dll, Business.dll, DBEngine.dll, Extensibility.dll, Inherited UI.dll, UI.DLL
  6. Drag the selected files into the "c:\windows\assembly" folder (GAC)
  7. You assemblies will now be on the latest version.
  8. Go back into Visual Studio and see if the error persists

If the error still occurs at this point, I know for a fact the the structure on the SQL Server does not match the business objects in the assemblies and we will need to get your data structures up to date.

Let me know if this gets you going.

By Joe Paquette - 7/21/2006

I'm having the same problem as CT had initially (Invalid object name 'DTEprojects'.).  I originally had the trial edition loaded, deinstalled it, and then loaded the licensed 1.4.1 prerelease.  That is when I ran into this problem.  So, I deinstalled everything, dropped the three StrataFrame databases, deleted all StrataFrame directories, and verified that the GAC no longer had any StrataFrame assemblies (except for the license assembly which I could not delete).  I then reinstalled StrataFrame and verified that the 3 databases were recreated.  I am still getting the same thrown exception.

So, based on the info in the previous posts, there must be a problem in one of the databases.  Can you provide the info I need to fix the database?

Thanks!

By Joe Paquette - 7/21/2006

FYI, the StrataFrame database does have a table named DTEprojects.
By StrataFrame Team - 7/21/2006

Joe,

Check the StrataFrame database connection within Visual Studio and make sure it is configured propertly.  Open the Database Connection option from the StrataFrame menu within Visual Studio and edit the one that has a checkmark on it.  It should be pointed to the location where you have your StrataFrame database installed.

By Joe Paquette - 7/21/2006

I have 2 database connections.  One for StrataFrame and one for Northwind (my testing DB).  The Northwind connection was the only one with the green checkmark on it.  I deleted and recreated my connection for Northwind and edited the StrataFrame connection.  I changed both servers from Localhost to the server name (shouldn't make any difference, but tried it anyway) and saved the connections.  The connection info is correct, the server is up and running, and is available. 

After doing the above, I'm still getting the original exception.

By Joe Paquette - 7/24/2006

Since I was getting nowhere with the 1.4.1 release, I deinstalled everything again, dropped the StrataFrame databases, and verified that everything was deleted.  I then installed the 1.4.0 release, verified the StrataFrame databases were created, verified the StrataFrame database connection exists and points to the correct database.  I then created a new StrataFrame Windows application project in VS2005.  Then I went to the Business Object Mapper and clicked on it.  I am still getting the same error as before.  The StrataFrame database does have a table named DTEprojects, and that table is empty.  

I do NOT have the Database Deployment ToolKit.  Since this an optional product, could this problem be a dependency issue?  When I was playing with the trial license, I did have this tool loaded and I didn't have any problems with Business Object Mapper.

By StrataFrame Team - 7/25/2006

OK, the reason you're getting that exception is that the Northwind connection is the active connection.  The Database Connection option in the StrataFrame menu is not used for your application's connections.  The only connection that should be listed within the Database Connections is the StrataFrame connection.  Your application's connection string is configured through the SetDataSources() method of the AppMain.vb (or program.cs file).  So, the StrataFrame design-time components were trying to use the Northwind connection to find the StrataFrame tables (which is, of course, not going to work Wink).  So, delete that Northwind connection and configure it within the SetDataSource() and set the active StrataFrame Database Connection as the correct one within the Database Connections dialog.  The BOMapper will come back to life.
By Joe Paquette - 7/25/2006

That did it!  Thanks!
By StrataFrame Team - 7/25/2006

Excellent Smile glad to hear it.