mirror of
https://github.com/mRemoteNG/mRemoteNG.git
synced 2026-02-17 22:11:48 +08:00
Update SqlDatabaseMetaDataRetriever.cs
fix exception casting int64 to int32, unbox and cast to int
This commit is contained in:
@@ -113,7 +113,7 @@ namespace mRemoteNG.Config.Serializers.ConnectionSerializers.MsSql
|
||||
// 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");
|
||||
cmd.ExecuteNonQuery();
|
||||
exists = (int)cmd.ExecuteScalar()! == 1;
|
||||
exists = (int)(long)cmd.ExecuteScalar()! == 1;
|
||||
}
|
||||
catch
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user