|
@@ -29,29 +29,10 @@ namespace HyperCube
|
|
|
}
|
|
|
|
|
|
public async Task<bool> IsConnect()
|
|
|
- {
|
|
|
-
|
|
|
+ {
|
|
|
string connstring = $"Server={Server}; database={DatabaseName}; UID={UserName}; password={Password}";
|
|
|
if (Connection != null)
|
|
|
- {
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- await SQLSelectComplex("select COUNT(*) from accounts", false);
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- }
|
|
|
+ await SQLSelectComplex("select COUNT(*) from accounts", false);
|
|
|
else
|
|
|
Console.WriteLine($"SQL IsConnect Connection null");
|
|
|
|
|
@@ -109,7 +90,6 @@ namespace HyperCube
|
|
|
|
|
|
|
|
|
|
|
|
-
|
|
|
if (!accs.ContainsKey(newacc.UUID))
|
|
|
accs.Add(newacc.UUID, newacc);
|
|
|
newacc.bsel = rdr.GetByte(17);
|
|
@@ -249,7 +229,7 @@ namespace HyperCube
|
|
|
if (connected)
|
|
|
{
|
|
|
|
|
|
- List<Dictionary<string, object>> retval = new List<Dictionary<string, object>>();
|
|
|
+ List<Dictionary<string, object>> retval = new();
|
|
|
MySqlCommand SQLcom2 = new(request, Connection);
|
|
|
|
|
|
|
|
@@ -259,7 +239,7 @@ namespace HyperCube
|
|
|
while (Reader.Read())
|
|
|
{
|
|
|
|
|
|
- Dictionary<string, object> data = new Dictionary<string, object>();
|
|
|
+ Dictionary<string, object> data = new();
|
|
|
|
|
|
for (int i = 0; i < Reader.FieldCount; i++)
|
|
|
{
|