This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user