StrataFrame Forum

New project creation

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

By raymessier - 2/6/2007

Development Environment
.NET Framework ver 2.0.50727
Windows Server 2003, Enterprise Edition Build 3790 (Service Pack 2, v.2825)
Visual Studio 2005 Professional Edition ver 8.0.50727.762 (SP.050727-7600)
Microsoft SQL Server 2005 - 9.00.2047.00 (Intel X86) Standard Edition

StrataFrame Assemblies I am using
// Assembly MicroFour StrataFrame Base, Version 1.5.0.0
// Assembly MicroFour StrataFrame Business, Version 1.5.0.0
// Assembly MicroFour StrataFrame DBEngine, Version 1.5.0.0
// Assembly MicroFour StrataFrame Extensibility, Version 1.5.0.0
// Assembly MicroFour StrataFrame Inherited UI, Version 1.5.0.0
// Assembly MicroFour StrataFrame Install, Version 1.3.2515.18818
// Assembly MicroFour StrataFrame Security, Version 1.5.0.0
// Assembly MicroFour StrataFrame UI, Version 1.5.0.0
// Assembly MicroFour StrataFrame Install, Version 1.3.2515.18818

 
Steps to re-create
1. Application Database Connections, StrataFrame Data Store is selected, and is valid, Selected
2.  File->New->Project
3. Visual C#->StrataFrame Windows Application
 -- Succeeded
4. StrataFrame->Solution Preferences
 -- No project listed in project drop down, no languages listed, no project listed under security preferences
5. Cancel
6. Save all and rebuild solution
7. StrataFrame->Solution Preferences
 -- No project listed in project drop down, no languages listed, no project listed under security preferences
8. StrataFrame->Business Object Mapper
  -- Odd, the project is listed under available projects here!
9. Highlight project name and select Configure Project under Actions
10. Select New in Choose Project dialog
11. Give project a name, Description, and select the Sql Server connection string (local server, trusted connection, projectname is the db name (the default))
12. Dialog->Save Changes? -- select Yes
First Error-- Broken Rules Exist red arrow highlights the Project Name, "A project already exists with this name"
 -- Now, I created a scratch project using a new name, for sure it did not exist. So I cancel out, and cancel out of the Choose project dialog
 and then close the Business Object Mapper.
 13. Rebuild Project, save all then pull up the Business Object Mapper again, red x next to project name, highlight and select configure project.
 14. Project now available in Choose Project, select it and  hit edit.
 15. Prior information is all there as I added, I then hit the Okay Button. it is at this point I get the unhandled exception error:
 The exception unknown software exception (0xe053534f) occurred in the application at location 0x77e4bee7.
 16. Click Okay, VS crashed out.
 
 I start up VS again, Pull up the Business Object Mapper, Configure Project, Highlight the new project and select "Select", first time I do this it is okay,
 the second time I get the unhandled exception error again?
 
 Does anyone know why or what is happening???

By seekonkray - 2/6/2007

I have spent the last several hours trying to  hammer this out. I did a Google search on the error message that led me to a hotfix for visual studio (it referenced the msvb7.dll file was hosed), but that did not fix the problem. I then reinstalled StrataFrame and tried again. Still getting the same error message, perhaps this is related to C# only? Nope, same thing happens in VB. Short of unistalling Visual Studio and then reinstalling (at least a two day affair) -- has anyone run in to this or has a quick workaround. I searched my entire hard drive for any log files that would reveal the error, but there where none that I could find, even after doing a @del /s /q c:\*.log and trying the whole process over again. Could it have something to do with invalid entries in the database (project wide)?
By Trent L. Taylor - 2/6/2007

Well, this has nothing to do with C# or VB.  Also, this more than likely has little to do with StrataFrame.  More than likely there is something within the DTE (Design Time Environment) that is used by StrataFrame which is manifesting this problem.

First of all, we are going to have to setup a Windows 2003 Server environment with Visual Studio before we can test this scenario.  Windows Server 2003 is not the most common environment on which to develop.  So I cannot give you an answer until we have setup this test environment.

By seekonkray - 2/6/2007

Well, thats possible, I will disable or uninstall any DTE plugins that I have installed and see if that corrects it.
By seekonkray - 2/6/2007

Hopefully this help. I uninstalled all plugins and I still get the error, for some reason, it looks like it is trying to double up on the project name during a save...

Microsoft Visual Studio 2005
Version 8.0.50727.762  (SP.050727-7600)
Microsoft .NET Framework
Version 2.0.50727

Installed Edition: Professional

Microsoft Visual Basic 2005   77626-009-0000007-41370
Microsoft Visual Basic 2005

Microsoft Visual C# 2005   77626-009-0000007-41370
Microsoft Visual C# 2005

Microsoft Visual C++ 2005   77626-009-0000007-41370
Microsoft Visual C++ 2005

Microsoft Visual J# 2005   77626-009-0000007-41370
Microsoft Visual J# 2005

Microsoft Visual Web Developer 2005   77626-009-0000007-41370
Microsoft Visual Web Developer 2005

Hotfix for Microsoft Visual Studio 2005 Professional Edition - ENU (KB915038)  
This Hotfix is for Microsoft Visual Studio 2005 Professional Edition - ENU.
If you later install a more recent service pack, this Hotfix will be uninstalled automatically.
For more information, visit http://support.microsoft.com/kb/915038

Microsoft Visual Studio 2005 Premier Partner Edition - ENU Service Pack 1 (KB926601)  
This service pack is for Microsoft Visual Studio 2005 Premier Partner Edition - ENU.
If you later install a more recent service pack, this service pack will be uninstalled automatically.
For more information, visit http://support.microsoft.com/kb/926601

Security Update for Microsoft Visual Studio 2005 Professional Edition - ENU (KB925674)  
This Security Update is for Microsoft Visual Studio 2005 Professional Edition - ENU.
If you later install a more recent service pack, this Security Update will be uninstalled automatically.
For more information, visit http://support.microsoft.com/kb/925674

Source     : MicroFour StrataFrame Business

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.ExecuteReader()
   at MicroFour.StrataFrame.Data.DbDataSourceItem.InternalExecuteReader(DbCommand Command, Boolean IsTransactional, String TransactionKey)
   at MicroFour.StrataFrame.Data.SqlDataSourceItem.UpdateRow(QueryInformation QueryInfo, DataRow RowToUpdate, ConcurrencyExceptionHandler ConcurrencyHandler, AddRowErrorHandler RowErrorHandler, Boolean RecreateCommand)
   at MicroFour.StrataFrame.Data.DbDataSourceItem.UpdateRow(QueryInformation QueryInfo, DataRow RowToUpdate, ConcurrencyExceptionHandler ConcurrencyHandler, AddRowErrorHandler RowErrorHandler)
   at MicroFour.StrataFrame.Data.DataLayer.UpdateDataTableThread(Object ThreadParams)
   at MicroFour.StrataFrame.Data.DataLayer.SaveByForm(DataTable TableToSave, Boolean Transactional, String TransactionKey)
   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.AddIns.PartialClassBuilderProjectPicker.OpenProject(Int32 ProjectPrimaryKey)

By StrataFrame Team - 2/7/2007

You can turn on debugging of the data sources used by the StrataFrame addins with some registry keys:

Key: HKLM\Software\MicroFour\VSAddIns

Values:   DebugMode / DWord / any value other than 0
             DebugFile / string / the full path to an output file (i.e.: "C:\Debug.html")

Then, if you would run the BOMapper until you get the error and attach the debug file to your next post.  You'll probably have to zip it because I don't think you can directly post an HTML file.

By seekonkray - 2/7/2007

Thanks, I did and got the same failure but captured the debug file. I rar'd it up and attached it.
By Trent L. Taylor - 2/8/2007

Ray,

This file was so large that it was not usable.  Would you please get out of Visual Studio, delete the debug HTML file.  Then go in and go straight to the BO Mapper where the error manifests itself. There was so much in this file it was as though you had been running much longer and it was difficult to read.  Thanks.

By seekonkray - 2/8/2007

I did as you asked. The odd thing is, the debug file is only 7 megs when I go straight into the business mapper, it is not until I hit the Okay button and Visual Studio crashes out that the file grows to over 95 megs! So, that might help narrow it down, but it is tiny until that point and I am going straight into the project then the mapper and configure, edit, and just hitting okay. That blows up Visual Studio. I'll send another debug file, but, its the smallest I can get it.
By StrataFrame Team - 2/9/2007

For some reasons, when the business object attempts to save the record, SQL Server thinks that there is a concurrency exception.  We are testing OptimisticAllFields within that business object, and something in your SQL Server install is different from the norm... collation, case-sensitivity, not sure.  So, SQL Server won't let the record update because it detects a concurrency issue, but the business object realizes that there is not a concurrency issue, so it automatically resaves the record... at which point, it gets into a loop.

So, we changed the BOMapper business objects to use row versioning and stored procedures to circumvent the issues with concurrency in different database environments.  The changes will be in the next update.

By seekonkray - 2/10/2007

Thanks, to help figure it out, here are the db settings I have

exec sp_configure

name                                minimum     maximum     config_value run_value
----------------------------------- ----------- ----------- ------------ -----------
Ad Hoc Distributed Queries          0           1           0            0
affinity I/O mask                   -2147483648 2147483647  0            0
affinity mask                       -2147483648 2147483647  0            0
Agent XPs                           0           1           1            1
allow updates                       0           1           0            0
awe enabled                         0           1           0            0
blocked process threshold           0           86400       0            0
c2 audit mode                       0           1           0            0
clr enabled                         0           1           1            1
cost threshold for parallelism      0           32767       5            5
cross db ownership chaining         0           1           0            0
cursor threshold                    -1          2147483647  -1           -1
Database Mail XPs                   0           1           1            1
default full-text language          0           2147483647  1033         1033
default language                    0           9999        0            0
default trace enabled               0           1           1            1
disallow results from triggers      0           1           0            0
fill factor (%)                     0           100         0            0
ft crawl bandwidth (max)            0           32767       100          100
ft crawl bandwidth (min)            0           32767       0            0
ft notify bandwidth (max)           0           32767       100          100
ft notify bandwidth (min)           0           32767       0            0
index create memory (KB)            704         2147483647  0            0
in-doubt xact resolution            0           2           0            0
lightweight pooling                 0           1           0            0
locks                               5000        2147483647  0            0
max degree of parallelism           0           64          0            0
max full-text crawl range           0           256         4            4
max server memory (MB)              16          2147483647  2147483647   2147483647
max text repl size (B)              0           2147483647  65536        65536
max worker threads                  128         32767       0            0
media retention                     0           365         0            0
min memory per query (KB)           512         2147483647  1024         1024
min server memory (MB)              0           2147483647  0            8
nested triggers                     0           1           1            1
network packet size (B)             512         32767       4096         4096
Ole Automation Procedures           0           1           1            1
open objects                        0           2147483647  0            0
PH timeout (s)                      1           3600        60           60
precompute rank                     0           1           0            0
priority boost                      0           1           0            0
query governor cost limit           0           2147483647  0            0
query wait (s)                      -1          2147483647  -1           -1
recovery interval (min)             0           32767       0            0
remote access                       0           1           1            1
remote admin connections            0           1           1            1
remote login timeout (s)            0           2147483647  20           20
remote proc trans                   0           1           0            0
remote query timeout (s)            0           2147483647  600          600
Replication XPs                     0           1           0            0
scan for startup procs              0           1           0            0
server trigger recursion            0           1           1            1
set working set size                0           1           0            0
show advanced options               0           1           1            1
SMO and DMO XPs                     0           1           1            1
SQL Mail XPs                        0           1           1            1
transform noise words               0           1           0            0
two digit year cutoff               1753        9999        2049         2049
user connections                    0           32767       0            0
user options                        0           32767       518          518
Web Assistant Procedures            0           1           1            1
xp_cmdshell                         0           1           1            1

EXEC SP_DBOPTION 'StrataFrame'

The following options are set:
-----------------------------------
autoclose
trunc. log on chkpt.
default to local cursor
autoshrink
auto create statistics
cursor close on commit
auto update statistics

By StrataFrame Team - 2/13/2007

Looks pretty comparable to the database we have here... the values that are different shouldn't really make all that much of a difference.  Either way, when the 1.6 update is released, this will be a moot point since we switched the business objects over to use row versioning.
By seekonkray - 2/13/2007

Is there any short term workaround? I'd really like to start using the product.
By Trent L. Taylor - 2/13/2007

Have you tried to load on another machine to see if you have the same problems?  There are a number of items in the mix and it would be nice to see if another SQL instance and machine behaved the same way.  At the moment we are not sure if we are fighting a Windows Server 2003 setup or a SQL Server issue.  Do you have an XP machine that you could load on to see if the error persists?
By seekonkray - 2/16/2007

Okay, I am ready to give up. This is causing me nothing but grief. I uninstalled Sql2005 and installed Sql 2000 standard sp4, installed the upgraded patch (1.6) and I know get this error

No matter what I do, it keeps trying to use a non-existent odbc connection! I have searched my drive to find where you hide it but I can't.  And before you jump to the obvious,

ConnectionManager.ApplicationKey = "cap";
ConnectionManager.ApplicationDefaultTitle = "cap Connection";
ConnectionManager.ApplicationDefaultDescription = "This application connection is used by cap";
ConnectionManager.AddRequiredDataSourceItem("", "SQL Connection",
DataSourceTypeOptions.SqlServer, "MyDatabase", "This connection is used by cap.");

I have tried to create a vanilla project, after selecting a StrataFrame database connection from the pull down (prior to creating project). Then, I create the project and run it, I am asked for the login information. It loads up all the databases within it and I select the target (cap). Now, I open the business manager and I get the error below!!!!!!!!!!!!!!!

SqlException
 An error has occurred while establishing a connection to the server.  When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)

Source     : .Net SqlClient Data Provider

Stack Trace:
   at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
   at System.Data.SqlClient.TdsParser.Connect(Boolean& useFailoverPartner, Boolean& failoverDemandDone, String host, String failoverPartner, String protocol, SqlInternalConnectionTds connHandler, Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity, SqlConnection owningObject, Boolean aliasLookup)
   at System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance)
   at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance)
   at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection)
   at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options)
   at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject)
   at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject)
   at System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject)
   at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)
   at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
   at System.Data.SqlClient.SqlConnection.Open()
   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)