mirror of
https://github.com/mRemoteNG/mRemoteNG.git
synced 2026-02-17 14:07:46 +08:00
@@ -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);
|
||||
}
|
||||
}
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user