Addressed issues where users on Windows 10 and Windows 11 were having issues running running the project.

1) Updated all projects to .NET Framework 4.7.2. This was a necessary prerequisite for the core fix.

2) The core fix is to upgrade the version of MySql.Data to address an error when opening connections. There is some kind of nuget issue with updating to the latest version (8.0.32) so fell back to updating to version 8.0.31. This also causes the addition of several all dependant libraries. Opted to just keep those at whatever version was specified by MySql.Data for now.

3) With the upgrade to MySql.Data, there is a behavioral change with the way the .Prepare statemenet works, and now it's required that parameters be added BEFORE calling .Prepare. So I've maded adjustments to the calls to .Prepare.
This commit is contained in:
striche 2023-02-04 16:35:15 -06:00
parent 8ceee35492
commit 1e311904cc
16 changed files with 251 additions and 80 deletions

View file

@ -51,8 +51,6 @@ namespace Meteor.Map.utils
cmd.Parameters.AddWithValue("@id", 100);
cmd.Parameters.AddWithValue("@placename", "");
cmd.Prepare();
Dictionary<uint, string> placenames = new Dictionary<uint, string>();
string line2;
@ -101,6 +99,7 @@ namespace Meteor.Map.utils
cmd.Parameters["@placename"].Value = placenames[pId];
Program.Log.Debug("Wrote: {0}", id);
cmd.Prepare();
cmd.ExecuteNonQuery();
}
@ -133,9 +132,7 @@ namespace Meteor.Map.utils
MySqlCommand cmd = new MySqlCommand(query, conn);
cmd.Parameters.AddWithValue("@id", 100);
cmd.Parameters.AddWithValue("@displayNameId", 100);
cmd.Prepare();
string line, line2;
Regex csvSplit = new Regex("(?:^|,)(\"(?:[^\"]+|\"\")*\"|[^,]*)", RegexOptions.Compiled);
System.IO.StreamReader file = new System.IO.StreamReader("D:\\Coding\\FFXIV Related\\FFXIV Tool\\2012.09.19.0001.decode.csv\\actorclass.csv");
@ -159,6 +156,7 @@ namespace Meteor.Map.utils
cmd.Parameters["@displayNameId"].Value = nameId;
Program.Log.Debug("Wrote: {0} : {1}", id, nameId);
cmd.Prepare();
cmd.ExecuteNonQuery();
}
@ -198,8 +196,6 @@ namespace Meteor.Map.utils
for (int i = 0; i < NUMFIELDS; i++)
cmd.Parameters.AddWithValue("@v" + i, 100);
cmd.Prepare();
string line;
Regex csvSplit = new Regex("(?:^|,)(\"(?:[^\"]+|\"\")*\"|[^,]*)", RegexOptions.Compiled);
//System.IO.StreamReader file = new System.IO.StreamReader("D:\\Coding\\FFXIV Related\\FFXIV Tool\\2012.09.19.0001.decode.csv\\actorclass.csv");
@ -224,7 +220,8 @@ namespace Meteor.Map.utils
cmd.Parameters["@id"].Value = id;
Program.Log.Debug("Wrote: {0}", id);
Program.Log.Debug("Wrote: {0}", id);
cmd.Prepare();
cmd.ExecuteNonQuery();
}
@ -260,7 +257,6 @@ namespace Meteor.Map.utils
cmd.Parameters.AddWithValue("@name", "Battle");
cmd.Parameters.AddWithValue("@otherId", 0);
cmd.Parameters.AddWithValue("@rewardPoints", 0);
cmd.Prepare();
int otherId = 1;
string line, line2;
@ -314,6 +310,7 @@ namespace Meteor.Map.utils
cmd.Parameters["@name"].Value = name;
cmd.Parameters["@otherId"].Value = otherId;
cmd.Parameters["@rewardPoints"].Value = points;
cmd.Prepare();
cmd.ExecuteNonQuery();
otherId++;