Error adding security and messaging tables


Author
Message
Aaron Young
Aaron Young
StrataFrame User (349 reputation)StrataFrame User (349 reputation)StrataFrame User (349 reputation)StrataFrame User (349 reputation)StrataFrame User (349 reputation)StrataFrame User (349 reputation)StrataFrame User (349 reputation)StrataFrame User (349 reputation)StrataFrame User (349 reputation)
Group: StrataFrame Users
Posts: 277, Visits: 1.1K
I have tried to add the security and messaging tables to my existing database and it throws the following error after I click Yes after I am asked if I want to save changes.

Not really sure where I have gone wrong so any help will be appreciated.

Thanks.

BusinessLayerException
  An error occurred while saving an the data to the server.
BusinessLayerException
  An error occurred while saving an the data to the server.
DataLayerSavingException
  Invalid column name 'tbl_DefaultPrefix'.
SqlException
  Invalid column name 'tbl_DefaultPrefix'.

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.UpdateDataTable(DataTable TableToUpdate, Boolean Transactional, String TransactionKey)
   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.UI.Windows.Forms.BaseForm.OnFormClosing(FormClosingEventArgs e)
   at System.Windows.Forms.Form.CheckCloseDialog(Boolean closingOnly)

Trent Taylor
Trent Taylor
StrataFrame Developer (8.7K reputation)StrataFrame Developer (8.7K reputation)StrataFrame Developer (8.7K reputation)StrataFrame Developer (8.7K reputation)StrataFrame Developer (8.7K reputation)StrataFrame Developer (8.7K reputation)StrataFrame Developer (8.7K reputation)StrataFrame Developer (8.7K reputation)StrataFrame Developer (8.7K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
First, make sure that you have the most recent package files (since I don't know what version of SF you are running, just use the attached package files).  You will want to copy the attached package files to: c:\program files\common files\microfour\StrataFrame.  Just override the existing package files.

Then go back into the DDT and manually delete security and messaging tables and views...then BE SURE TO go into the Object Name History and delete the records that indicate that the tables have been deleted for the security and messaging tables...otherwise they will be gone after you deploy later Smile

Then after you have copied these package files, go in and try the process again.  At this point you should at least be using the same package files and it will make it easier to troubleshoot.

Attachments
StrataFrameMessaging.pkg (176 views, 15.00 KB)
Security.pkg (203 views, 23.00 KB)
Aaron Young
Aaron Young
StrataFrame User (349 reputation)StrataFrame User (349 reputation)StrataFrame User (349 reputation)StrataFrame User (349 reputation)StrataFrame User (349 reputation)StrataFrame User (349 reputation)StrataFrame User (349 reputation)StrataFrame User (349 reputation)StrataFrame User (349 reputation)
Group: StrataFrame Users
Posts: 277, Visits: 1.1K
I am using the latest beta build.

I used your latest packages and tried it again with the same error message. Basically, no tables or views are added to the database and there was nothing at all in the Object Name History. It goes through the whole process and fires the error message immediately aftering asking if I want to save changes.

Aaron Young
Aaron Young
StrataFrame User (349 reputation)StrataFrame User (349 reputation)StrataFrame User (349 reputation)StrataFrame User (349 reputation)StrataFrame User (349 reputation)StrataFrame User (349 reputation)StrataFrame User (349 reputation)StrataFrame User (349 reputation)StrataFrame User (349 reputation)
Group: StrataFrame Users
Posts: 277, Visits: 1.1K
Not sure if this is related but when I try and deploy to the database, it throws an Event ID: 1026 error and later complains that it can't find AppData\Local\Temp\MicroFour\MetaData\ProfileScripts.xml in my local user folder. I have checked and there isn't a ProfileScripts.xml file in this folder.

In addition, when I click on Profile Scripts in DDT it throws the error below:-

UIException
  Dynamically populating the ListView failed.  Could not create and fill the business object of type 'MicroFour.StrataFrame.Business.DBEScriptsBO'
TargetInvocationException
  Exception has been thrown by the target of an invocation.
SqlException
  Invalid object name 'DBEScripts'.

Source     : MicroFour StrataFrame UI

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.Business.DBEScriptsBO.FillAllByProfile(Int32 profilePk)
   at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
   at System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at MicroFour.StrataFrame.UI.Windows.Forms.ListView.GetFilledBusinessObject(Object[] Parameters)
   at MicroFour.StrataFrame.UI.Windows.Forms.ListView.PopulateListView(Object[] Parameters)
   at MicroFour.StrataFrame.UI.Windows.Forms.ListView.Requery()
   at MicroFour.StrataFrame.Data.ProfileEditorDialog.Load_ProfileScriptDetails()
   at MicroFour.StrataFrame.Data.ProfileEditorDialog.PopulateDetailList(DBEObjectType tvitem)
   at MicroFour.StrataFrame.Data.ProfileEditorDialog.ProcessTreeviewSelection(DBETVItem tvItem)

Trent Taylor
Trent Taylor
StrataFrame Developer (8.7K reputation)StrataFrame Developer (8.7K reputation)StrataFrame Developer (8.7K reputation)StrataFrame Developer (8.7K reputation)StrataFrame Developer (8.7K reputation)StrataFrame Developer (8.7K reputation)StrataFrame Developer (8.7K reputation)StrataFrame Developer (8.7K reputation)StrataFrame Developer (8.7K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
I know what's wrong...you didn't update your SQL Structures when you loaded the last beta.  There were new fields added that allow you to specifiy a default prefix for the table.  That is why the error is popping up...it can't add a new table.  You would probably get the very same error if you try and manually create and save a table.

Reload the SF beta and be sure to let the data structures be updated.

Trent Taylor
Trent Taylor
StrataFrame Developer (8.7K reputation)StrataFrame Developer (8.7K reputation)StrataFrame Developer (8.7K reputation)StrataFrame Developer (8.7K reputation)StrataFrame Developer (8.7K reputation)StrataFrame Developer (8.7K reputation)StrataFrame Developer (8.7K reputation)StrataFrame Developer (8.7K reputation)StrataFrame Developer (8.7K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
Just FYI....you not updating the data structures is the cause of all of these errors Smile
Aaron Young
Aaron Young
StrataFrame User (349 reputation)StrataFrame User (349 reputation)StrataFrame User (349 reputation)StrataFrame User (349 reputation)StrataFrame User (349 reputation)StrataFrame User (349 reputation)StrataFrame User (349 reputation)StrataFrame User (349 reputation)StrataFrame User (349 reputation)
Group: StrataFrame Users
Posts: 277, Visits: 1.1K
Thanks Trent - you were right Smile
Trent Taylor
Trent Taylor
StrataFrame Developer (8.7K reputation)StrataFrame Developer (8.7K reputation)StrataFrame Developer (8.7K reputation)StrataFrame Developer (8.7K reputation)StrataFrame Developer (8.7K reputation)StrataFrame Developer (8.7K reputation)StrataFrame Developer (8.7K reputation)StrataFrame Developer (8.7K reputation)StrataFrame Developer (8.7K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
Cool Cool It was bound to happen sooner or later 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