This commit is contained in:
2021-09-10 19:03:46 +00:00
parent c00af2a160
commit 5f97efbd0f
3 changed files with 46 additions and 2 deletions

View File

@@ -145,6 +145,32 @@ namespace AyaNova.Util
}
}
///////////////////////////////////////////
// Get database locale settings
//
internal static string DBServerRunTimeParameters(AyaNova.Models.AyContext ct)
{
using (var cmd = ct.Database.GetDbConnection().CreateCommand())
{
ct.Database.OpenConnection();
cmd.CommandText = $"SHOW ALL;";
using (var dr = cmd.ExecuteReader())
{
if (dr.Read())
{
if (dr.IsDBNull(0))
return "Unknown / no results";
else
return (dr.GetString(0));
}
else
{
return "Unknown / no results";
}
}
}
}
///////////////////////////////////////////
//Verify that server exists