diff --git a/mRemoteNG/App/Info/ConnectionsFileInfo.cs b/mRemoteNG/App/Info/ConnectionsFileInfo.cs index 05f2ce09..ded493ff 100644 --- a/mRemoteNG/App/Info/ConnectionsFileInfo.cs +++ b/mRemoteNG/App/Info/ConnectionsFileInfo.cs @@ -9,6 +9,6 @@ namespace mRemoteNG.App.Info public static readonly string DefaultConnectionsPath = SettingsFileInfo.SettingsPath; public static readonly string DefaultConnectionsFile = "confCons.xml"; public static readonly string DefaultConnectionsFileNew = "confConsNew.xml"; - public static readonly Version ConnectionFileVersion = new Version(2, 8); + public static readonly Version ConnectionFileVersion = new Version(3, 0); } } \ No newline at end of file diff --git a/mRemoteNG/Config/Serializers/ConnectionSerializers/Sql/DataTableSerializer.cs b/mRemoteNG/Config/Serializers/ConnectionSerializers/Sql/DataTableSerializer.cs index 070e9494..1c9096e3 100644 --- a/mRemoteNG/Config/Serializers/ConnectionSerializers/Sql/DataTableSerializer.cs +++ b/mRemoteNG/Config/Serializers/ConnectionSerializers/Sql/DataTableSerializer.cs @@ -628,6 +628,7 @@ namespace mRemoteNG.Config.Serializers.ConnectionSerializers.Sql dataRow["VNCSmartSizeMode"] = connectionInfo.VNCSmartSizeMode; dataRow["VNCViewOnly"] = connectionInfo.VNCViewOnly; // TODO: this column can eventually be removed. we now save this property locally dataRow["VmId"] = connectionInfo.VmId; + dataRow["UserViaAPI"] = connectionInfo.UserViaAPI; if (_saveFilter.SaveInheritance) { @@ -706,6 +707,7 @@ namespace mRemoteNG.Config.Serializers.ConnectionSerializers.Sql dataRow["InheritVNCSmartSizeMode"] = connectionInfo.Inheritance.VNCSmartSizeMode; dataRow["InheritVNCViewOnly"] = connectionInfo.Inheritance.VNCViewOnly; dataRow["InheritVmId"] = connectionInfo.Inheritance.VmId; + dataRow["UserViaAPI"] = connectionInfo.UserViaAPI; dataRow["InheritCacheBitmaps"] = connectionInfo.Inheritance.CacheBitmaps; } else @@ -782,6 +784,7 @@ namespace mRemoteNG.Config.Serializers.ConnectionSerializers.Sql dataRow["InheritVNCSmartSizeMode"] = false; dataRow["InheritVNCViewOnly"] = false; dataRow["InheritCacheBitmaps"] = false; + dataRow["UserViaAPI"] = ""; } if (isNewRow) _dataTable.Rows.Add(dataRow); diff --git a/mRemoteNG/Config/Serializers/ConnectionSerializers/Sql/SqlDatabaseMetaDataRetriever.cs b/mRemoteNG/Config/Serializers/ConnectionSerializers/Sql/SqlDatabaseMetaDataRetriever.cs index 57515288..41d52f77 100644 --- a/mRemoteNG/Config/Serializers/ConnectionSerializers/Sql/SqlDatabaseMetaDataRetriever.cs +++ b/mRemoteNG/Config/Serializers/ConnectionSerializers/Sql/SqlDatabaseMetaDataRetriever.cs @@ -118,7 +118,8 @@ namespace mRemoteNG.Config.Serializers.ConnectionSerializers.Sql try { // ANSI SQL way. Works in PostgreSQL, MSSQL, MySQL. - var cmd = databaseConnector.DbCommand("select case when exists((select * from information_schema.tables where table_name = '" + tableName + "')) then 1 else 0 end"); + var database_name = Properties.OptionsDBsPage.Default.SQLDatabaseName; + var cmd = databaseConnector.DbCommand("select case when exists((select * from information_schema.tables where table_name = '" + tableName + "' and table_schema='"+ database_name + "')) then 1 else 0 end"); var cmdResult = Convert.ToInt16(cmd.ExecuteScalar()); exists = (cmdResult == 1); }