Group: Forum Members
Posts: 69,
Visits: 1.3K
|
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)
|
Group: Forum Members
Posts: 69,
Visits: 1.3K
|
Sorry,
I forgot to mention that I get
"Altering table 'MessageLanguages' failed."
if I try do deploy to server...
Ralph
|
Group: StrataFrame Developers
Posts: 6.6K,
Visits: 7K
|
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.
|