Mremoteng: Load from SQL failed after updating to 1.77.0.9

Created on 3 Sep 2019  路  4Comments  路  Source: mRemoteNG/mRemoteNG

Expected Behavior

I'm using a database named mRemoteNG on a SQL 2014 Cluster. Access rights are present via a domain group. mRemoteNG should connect and load the config from the database.

Current Behavior

After updating the portable version (I forgot which one, but I think it was 1.76.12.38511) to 1.77.0.9 I get an error:

Load from SQL failed
The connection information could not be loaded from the SQL server
Column 'RedirectedAudioCapture' does nog beling to table.

Another error screen, from the non-portable version, installed elsewhere:

Exception Message
Column 'RedirectAudioCapture' does not belong to table .

Stack trace
   at System.Data.DataRow.GetDataColumn(String columnName)
   at System.Data.DataRow.get_Item(String columnName)
   at mRemoteNG.Config.Serializers.MsSql.DataTableDeserializer.PopulateConnectionInfoFromDatarow(DataRow dataRow, ConnectionInfo connectionInfo) in C:\projects\mremoteng-ke3rl\mRemoteV1\Config\Serializers\ConnectionSerializers\MsSql\DataTableDeserializer.cs:line 130
   at mRemoteNG.Config.Serializers.MsSql.DataTableDeserializer.DeserializeContainerInfo(DataRow row) in C:\projects\mremoteng-ke3rl\mRemoteV1\Config\Serializers\ConnectionSerializers\MsSql\DataTableDeserializer.cs:line 73
   at mRemoteNG.Config.Serializers.MsSql.DataTableDeserializer.CreateNodesFromTable(DataTable table) in C:\projects\mremoteng-ke3rl\mRemoteV1\Config\Serializers\ConnectionSerializers\MsSql\DataTableDeserializer.cs:line 53
   at mRemoteNG.Config.Serializers.MsSql.DataTableDeserializer.Deserialize(DataTable table) in C:\projects\mremoteng-ke3rl\mRemoteV1\Config\Serializers\ConnectionSerializers\MsSql\DataTableDeserializer.cs:line 35
   at mRemoteNG.Config.Connections.SqlConnectionsLoader.Load() in C:\projects\mremoteng-ke3rl\mRemoteV1\Config\Connections\SqlConnectionsLoader.cs:line 57
   at mRemoteNG.Connection.ConnectionsService.LoadConnections(Boolean useDatabase, Boolean import, String connectionFileName) in C:\projects\mremoteng-ke3rl\mRemoteV1\Connection\ConnectionsService.cs:line 126
   at mRemoteNG.UI.Forms.OptionsPages.SqlServerPage.ReinitializeSqlUpdater() in C:\projects\mremoteng-ke3rl\mRemoteV1\UI\Forms\OptionsPages\SqlServerPage.cs:line 82
   at mRemoteNG.UI.Forms.OptionsPages.SqlServerPage.SaveSettings() in C:\projects\mremoteng-ke3rl\mRemoteV1\UI\Forms\OptionsPages\SqlServerPage.cs:line 72
   at mRemoteNG.UI.Forms.FrmOptions.btnOK_Click(Object sender, EventArgs e) in C:\projects\mremoteng-ke3rl\mRemoteV1\UI\Forms\FrmOptions.cs:line 128
   at System.Windows.Forms.Control.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ButtonBase.WndProc(Message& m)
   at System.Windows.Forms.Button.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

Environment
OS: Microsoft Windows NT 6.3.9600.0
mRemoteNG Version: 1.77.0.9
Edition: MSI
Cmd line args: 

Possible Solution

I got suggested to run this on the database:

ALTER TABLE tblCons
ADD RedirectedAudioCapture BIT default 0;

This didn't solve the issue.

Steps to Reproduce (for bugs)

  1. Have mRemoteNG portable, connected to a SQL database
  2. Update it to version 1.77.0.9
  3. SQL connection is broken

Context

Unable to load configuration.

Your Environment

Windows 10 Enterprise (x64)
SQL Server 2014 (Cluster)

Question Support Request

Most helpful comment

RdpVersion is type string, so
alter table [mRemoteNG].[dbo].[tblCons] add [RdpVersion] varchar(10)

Please check mssqldb_setup.sql to latest database structure

All 4 comments

See #1453

However as a temporary fix you can run the below:

alter table [mRemoteNG].[dbo].[tblCons] add [RedirectAudioCapture] [bit] NOT NULL DEFAULT 0
alter table [mRemoteNG].[dbo].[tblCons] add [InheritRedirectAudioCapture] [bit] NOT NULL DEFAULT 0

This will add in the missing columns :)

Thanks. I ran it and then it gave the same error, but complaining about column 'RdpVersion'. Being creative, I ran a alter table [mRemoteNG].[dbo].[tblCons] add [RdpVersion] [bit] NOT NULL DEFAULT 0, and now I've got Unable to cast object of type 'System.Boolean' to type 'System.String'.

I'll try and start from scratch I guess. I do have an .xml config export.

RdpVersion is type string, so
alter table [mRemoteNG].[dbo].[tblCons] add [RdpVersion] varchar(10)

Please check mssqldb_setup.sql to latest database structure

That worked. Then I needed a alter table [mRemoteNG].[dbo].[tblCons] add [InheritRdpVersion] [bit] NOT NULL DEFAULT 0 and now it works again.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Taelyn picture Taelyn  路  4Comments

sparerd picture sparerd  路  3Comments

seth-c-stenzel picture seth-c-stenzel  路  4Comments

PCNerd2001 picture PCNerd2001  路  3Comments

nerddtvg picture nerddtvg  路  3Comments