By Ralph Rutschmann - 7/18/2007
Hello,
I moved my translation strings from xml to a sql-table, using the DDT. No error so far, all went well. Also the translation works pretty well on every single form with the standard language. But the framework seems to miss a column called 'lng_eventid' when I change the language at runtime.
Any hint?
Thanks in advance and friendly greetings,
Ralph
Errormessage:
SqlException
Ungültiger Spaltenname 'lng_eventid'.
Source : .Net SqlClient Data Provider
Stack Trace:
bei System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
bei System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
bei System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
bei System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
bei System.Data.SqlClient.SqlDataReader.ConsumeMetaData()
bei System.Data.SqlClient.SqlDataReader.get_MetaData()
bei System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
bei System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)
bei System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)
bei System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
bei System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
bei System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior)
bei System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior)
bei System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
bei System.Data.Common.DbDataAdapter.Fill(DataTable[] dataTables, Int32 startRecord, Int32 maxRecords, IDbCommand command, CommandBehavior behavior)
bei System.Data.Common.DbDataAdapter.Fill(DataTable dataTable)
bei MicroFour.StrataFrame.Data.DbDataSourceItem.GetDataTable(DbCommand Command, OnChangeEventHandler CallBack)
bei MicroFour.StrataFrame.Data.SqlDataSourceItem.GetDataTable(DbCommand Command, OnChangeEventHandler CallBack)
bei MicroFour.StrataFrame.Data.DbDataSourceItem.GetDataTable(QueryInformation QueryInfo, OnChangeEventHandler CallBack)
bei MicroFour.StrataFrame.UI.Localization.LoadLanguageTable(Boolean IgnoreExceptions)
bei MicroFour.StrataFrame.UI.Localization.SetActiveLanguageButtonText(Int32 LocaleID)
bei MicroFour.StrataFrame.UI.Localization.SetActiveLanguage(String ApplicationKey, Int32 LocaleID, String UserName)
bei MicroFour.StrataFrame.UI.LanguageSelectionDialog.cmdSelect_Click(Object sender, EventArgs e)
bei System.Windows.Forms.Control.OnClick(EventArgs e)
bei System.Windows.Forms.Button.OnClick(EventArgs e)
bei System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
bei System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
bei System.Windows.Forms.Control.WndProc(Message& m)
bei System.Windows.Forms.ButtonBase.WndProc(Message& m)
bei System.Windows.Forms.Button.WndProc(Message& m)
bei System.Windows.Forms.Control.ControlNativewindow.OnMessage(Message& m)
bei System.Windows.Forms.Control.ControlNativewindow.WndProc(Message& m)
bei System.Windows.Forms.Nativewindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
|
By Trent L. Taylor - 7/19/2007
The distribution package had not been updated. Attached is the updated StrataFrameMessaging.pkg file that has all of the updated structures for SQL. Copy this file to the C:\Program Files\Common Files\MicroFour\StrataFrame folder. It should replace the one that is there. Then, go back into the DDT and open up your profile that has the messaging tables in it. Click Profile -> Add Messaging and Localization Tables. After you pick the database, it will ask you if you want to "update the messaging tables" that area already in your database, jucy click "yes" and the lng_EventId field will be added to your MessageLanguages table.
|
By Ralph Rutschmann - 7/20/2007
Hello Trent,
it seemed to work. But now, as soon as I try to start the DDT from menu, I get the following error message (invalid object name 'dbo.DBEProfile', thus no way to do any thing with the DDT:
SqlException
Ungültiger Objektname 'dbo.DBEProfile'.
Source : .Net SqlClient Data Provider
Stack Trace:
bei System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
bei System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
bei System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
bei System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
bei System.Data.SqlClient.SqlDataReader.ConsumeMetaData()
bei System.Data.SqlClient.SqlDataReader.get_MetaData()
bei System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
bei System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)
bei System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)
bei System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
bei System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
bei System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior)
bei System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior)
bei System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
bei System.Data.Common.DbDataAdapter.Fill(DataTable[] dataTables, Int32 startRecord, Int32 maxRecords, IDbCommand command, CommandBehavior behavior)
bei System.Data.Common.DbDataAdapter.Fill(DataTable dataTable)
bei MicroFour.StrataFrame.Data.DbDataSourceItem.GetDataTable(DbCommand Command, OnChangeEventHandler CallBack)
bei MicroFour.StrataFrame.Data.SqlDataSourceItem.GetDataTable(DbCommand Command, OnChangeEventHandler CallBack)
bei MicroFour.StrataFrame.Data.DbDataSourceItem.GetDataTable(String Statement, OnChangeEventHandler CallBack)
bei MicroFour.StrataFrame.Data.DataLayer.GetDataTable(String Statement, Boolean RegisterNotification)
bei MicroFour.StrataFrame.Business.BusinessLayer.FillDataTable(String SelectStatement)
bei MicroFour.StrataFrame.Business.DBEProfileBO.FillAllByCategory()
bei MicroFour.StrataFrame.Data.ProfileOpen..ctor()
bei MicroFour.StrataFrame.Data.DatabaseMain.ShowProfileOpenDialog()
bei MicroFour.StrataFrame.Data.DatabaseMain.cmdOpen_Click(Object sender, EventArgs e)
bei System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
bei System.Windows.Forms.ToolStripButton.OnClick(EventArgs e)
bei System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
bei System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
bei System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)
bei System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)
bei System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
bei System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
bei System.Windows.Forms.Control.WndProc(Message& m)
bei System.Windows.Forms.ScrollableControl.WndProc(Message& m)
bei System.Windows.Forms.ToolStrip.WndProc(Message& m)
bei System.Windows.Forms.Control.ControlNativewindow.OnMessage(Message& m)
bei System.Windows.Forms.Control.ControlNativewindow.WndProc(Message& m)
bei System.Windows.Forms.Nativewindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
Thanks a lot and friendly greetings,
Ralph
|
By Trent L. Taylor - 7/22/2007
Anytime that you see this message (regarding DBEProfile) it means that your StrataFrame connection is invalid. Make sure that your connection is pointing to the database where StrataFrame resides. In short, we are trying to load all of the profiles from the DBEProfiles table and it cannot find it. To modify your connection, click the StrataFrame -> Database Connection and make sure that you point to the server with the StrataFrame database. Once this is done, go back into Database Deployment Toolkit.
|
By Ralph Rutschmann - 7/22/2007
Hi Trent,
> Anytime that you see this message (regarding DBEProfile)
> it means that your StrataFrame connection is invalid.
You're absolutely right. But I didn't change the connection for sure. Really!
Beside that: Shouldn't that exeption be handled by framework, giving a descriptive message what went wrong?
OK, now I get another error message:
"Altering table 'MessageLanguages' failed."
It's because of ALTER TABLE seems to try to add a column with no defaults or disabled null values (I don't believe the german error message will tell you much more). And yes, the next error message is about a missing column named 'lng_EventId'.
What do I have to look for next?
Thank you very much and friendly greetings,
Ralph
|
By Ralph Rutschmann - 7/22/2007
Sorry,
I forgot to mention that I get
"Altering table 'MessageLanguages' failed."
if I try do deploy to server...
Ralph
|
By Trent L. Taylor - 7/23/2007
Beside that: Shouldn't that exeption be handled by framework, giving a descriptive message what went wrong? Well, you would have to add a lot of logic before opening any table. In order to add this test, we would have to open and verify the structure on every table before it is opened....as you can understand, this would become a very complicated situation. Because just after we add the logic to handle the DBEProfile (since it is the first table in that example it tries to open) we would have to test on the structure and the second table that is opened, etc. And if a change is amde then we would have to change that logic. So really, yes if we wanted to spend a lot of time, but it really is not worth the effort in this case And yes, the next error message is about a missing column named 'lng_EventId'. The StrataFrameMessaging.pkg file attached to this thread (posted earlier) has the proper structure and will add the lng_EventId field to you DDT structures. First, check to make sure that your DDT MessageLanguages table has the lng_EventId field. If so, then you probably already have records deployed to the database you are trying to install to, so just open up the MessageLanguages table and modify the structure. Add a default value of (N'') and then re-package and redeploy.
|
By Ralph Rutschmann - 7/23/2007
Hi Trent,
thank you very much. I will try this. :-)
> Well, you would have to add a lot of logic
> before opening any table.
It sounds like a bit of overkill what you describe, yes. But that was not what I meant.
>> Anytime that you see this message (regarding DBEProfile)
>> it means that your StrataFrame connection is invalid.
I was hoping it would be easy to check for a valid connection and present an appropriate error message to the user. I didn't think about it would be necessary to check every single table and structure.
Thanks again and sorry for asking stupid questions.
I like the StrataFrame framework most and I hope some day I'm not a beginner anymore. :-)
Friendly greetings,
Ralph
|
By Trent L. Taylor - 7/23/2007
Thanks again and sorry for asking stupid questions. Hey, these are all valid questions Nothing to worry about! I like the StrataFrame framework most and I hope some day I'm not a beginner anymore. :-) This is always good to hear....I like the most too And you are well on your way
|
|