SEDCS 7.3.25 - Errors after connecting to Database / Campaign Settings

The common meeting place for SEOW veterans and noobs alike, sharing feedback, ideas and experiences.

Moderator: SEOW Developers

Post Reply
Rejsyg
Posts: 9
Joined: Sat 10 Sep 2022 2:14 pm

SEDCS 7.3.25 - Errors after connecting to Database / Campaign Settings

Post by Rejsyg »

I've come back after a while, had reinstalled my OS, and I've either forgot something or run into some issues with SEDCS and SEDB... :D
Any campaign I try to load the .sql from in SEDB75 seems to give me these errors, but I feel like I may have screwed up something when installing MariaDB and playing with the my.ini

After connecting to my DB I get these errors in SEDCS every time I switch tabs or try to do something. Evidently something is wrong with my Campaign_Settings table?

Image

Code: Select all

SEDCS::modDB.executeDBCommand: failed SQL ... UPDATE Campaign_Settings SET Mission_Length = 1, Duration_Air_Allied = 60, Duration_Ground_Allied = 60, Duration_Air_Axis = 60, Duration_Ground_Axis = 60, Idle_Aircraft = 10, Idle_Armour = 40, Idle_Artillery = 20, Idle_Engineer = 40, Idle_Shipping = 5, Idle_Vehicle = 20, Idle_Default = 30, Heavy_Rail_Freight = 0, HistorySFX_Mod = 0, Artillery_Furniture = 100, CCCI_Restriction = 0, Radar = 0, Radar_Ground_Allied = 0, Radar_Ship_Allied = 0, Radar_IFF_Allied = 0, Radar_Ground_Axis = 0, Radar_Ship_Axis = 0, Radar_IFF_Axis = 0, Runway_Lights = 100, Ace_Charisma = 1, Create_Supply_Points = 0, Enemy_Proximity = 500, Landing_Penalties = 0, Lock_Production_Allied = 0, Lock_Production_Axis = 0, Lock_Dissolve = 0, Forward_Supply = 0, Coop_Mod_Slot = 0, Supply_Drop_Limit = 0, Dead_Zone = 0, Single_Player_Mode = 0, Weak_Force = 2, Overwhelming_Force_Ratio = 5, Delegation_Mode = 0, Combat_Effectiveness = 1, Ground_Skill_Updates = 0, Freight_Radius = 3000, Chief_Endpoints = 0, Active_SPGs = 1, Entrenchments = 50, Use_Triggers = 0, Meta_Mode = 2, Observation_Cameras = 1, Meta_DMZ_Width = 1000, Barrage_Time_Delay = 2, Upload_Files = 0, Auto_Archive_Folder = 'undefined', Initialization_Mode = 0, Web_Service_URL = 'undefined';
Error : -2147217900
Description : [MySQL][ODBC 3.51 Driver][mysqld-5.5.5-10.4.25-MariaDB-log]Unknown column 'Barrage_Time_Delay' in 'field list'<p>
Image

Code: Select all

SEDCS::modUtilities.subLoadCampaignSettings: 3265: Item cannot be found in the collection corresponding to the requested name or ordinal.: SELECT * FROM Campaign_Settings;
Error : 3265
Description : Item cannot be found in the collection corresponding to the requested name or ordinal.<p>
Edit: I am using mariadb-10.4.25-winx64
IV/JG7_4Shades
Posts: 2211
Joined: Mon 08 Jan 2007 11:10 pm
Location: Perth, Western Australia

Re: SEDCS 7.3.25 - Errors after connecting to Database / Campaign Settings

Post by IV/JG7_4Shades »

Hi Rejsyg,

This is a pretty topical question. Over the past year I have been refactoring the SEDCS code base to use modern drivers for MySQL/Maria. What this means is that now we have a new SEDCS (v.8.0.0.x) that relies on Connector/NET for its database driver, instead of the ancient MyODBC-3.51 driver that is now 20 years old or more. You can download and install SEDCS 8 directly from SEOW HQ, just visit https://seowhq.net/SEDCS/ for more information. This is an auto-updating app now. I no longer support SEDCS v7.

As part of the modernization of SEDCS I have extended the code base to include support for ArmA 2 (Iron Front) operations as part of SEOW campaigning (previously coded as part of the Mission Planner as an experiment). You get this for free; it is your decision whether you want to run an SEOW campaign including first-person ground operations or not. All previous SEOW campaign styles are still supported. This change has meant that various DB tables have been restructured and/or repopulated.

The second big change over the past year is that the Mission Planner has been modernized to work on most major browsers, namely Edge, Opera, Chrome and Firefox, due to the not-so-long-ago retirement of MS Internet Explorer. In order to streamline the process of issuing DB updates I have built an update facility in the Mission Planner so that whenever it (the Mission Planner) connects to a database it runs some checks to update the DB version automatically. So if you keep your MP updated then you automatically keep your connected database updated too.

The current status of the 3 SEOW components is:

SEDCS, now at v8.0.0.44 (see https://seowhq.net/SEDCS/)
SEMP, now at v7.3.265 (downloadable/updateable as an SVN repository* from https://sourceforge.net/projects/seow/)
SEDB, now at v75 (minor revisions managed/updated automatically by SEMP, downloadable from https://sourceforge.net/projects/seow/)

Now to your specific question. It is hard for me to diagnose your problem accurately without knowing your SEOW component revisions. However, since I have re-installed my own PC operating system 6 times in the past year (another story!) I know that it is easy to get things mixed up and inconsistent. If you have a live campaign built on the old system and you want to keep it going, you may need some minor DB edits to eliminate those error messages you are seeing. I can help with that. If you just want to start afresh, then I recommend that you move to the new code components that I am actively developing now. Makes it easier for both of us in the long run.

Cheers,
4Shades

* See viewtopic.php?t=1155 for a detailed discussion on how to use the SVN repo for the Mission Planner.
IV/JG7_4Shades
SEOW Developer

Image
Rejsyg
Posts: 9
Joined: Sat 10 Sep 2022 2:14 pm

Re: SEDCS 7.3.25 - Errors after connecting to Database / Campaign Settings

Post by Rejsyg »

Thanks for the in depth reply. I have managed to get the new SEDCS installed after getting the 8.3.0.0 MySQL Connector/NET :D
Got TortoiseSVN installed and running, checked out the SEMP files, all smooth sailing.

I did keep getting these SQL errors when importing my tables into the SEDB:

Code: Select all

Error Code: 1418 - This function has none of DETERMINISTIC, NO SQL, or READS SQL DATA in its declaration and binary logging is enabled (you *might* want to use the less safe log_bin_trust_function_creators variable)

Code: Select all

Error Code: 1118 - Row size too large (> 8126). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
But these settings in my.ini fixed them

Code: Select all

innodb_strict_mode = 0
log_bin_trust_function_creators = 1
Once in SEDCS I connected my database, but this one error came up:

Code: Select all

SEDCS::modUtilities.subLoadCampaignSettings: 5: Column 'Idle_InfantrySpy' does not belong to table .: SELECT * FROM Campaign_Settings;
Error : 5
Description : Column 'Idle_InfantrySpy' does not belong to table .
SEDCS is quiet other than that.

Also in Mission Planner, I am seeing errors coming from MP-SQL.php

Code: Select all

Warning: Trying to access array offset on value of type bool in C:\laragon\www\SEOW\Scripts\MP-SQL.php on line 1380
Image

Managed to stop it with a null coalescing assignment, not what strCurrentMissions is supposed to do though :cry:

Code: Select all

$strCurrentMissions .= $thisUnitB."|".$rsCurrentMissions->fields["Objective_X"]."|".$rsCurrentMissions->fields["Objective_Y"]."^";
I am starting fresh, though I did notice some units have a broken image link, looks like Pacific-PFI_small.gif and Pacific-PDB_small do not exist in uniticons, so I copied Pacific-USA_small.gif and Pacific-Japan_small.gif, then renamed them. Honestly don't remember if it was missing prior.
Image

This is my SEOW campaign, template and database exports included: https://github.com/SAPHROF/SEOW.E2.Operation-M
IV/JG7_4Shades
Posts: 2211
Joined: Mon 08 Jan 2007 11:10 pm
Location: Perth, Western Australia

Re: SEDCS 7.3.25 - Errors after connecting to Database / Campaign Settings

Post by IV/JG7_4Shades »

OK, I've done the following:
  • Downloaded your files
  • Assembled the DB using your e2 update version, Airbases, Highways, Railway_Stations etc (check Campaign_Settings)
  • Pointed my MP at the DB, resulting in autoupdate of DB structure from v75 to v80b (see pic A below)
  • Connected SEDCSv8.0.0.44 to the DB (still get an error in Campaign_Settings saying 500 is too large for some field)
  • Initialized the campaign using your template, no errors.
  • Viewed the full sector map in the MP (see pic B below)
Here is Pic A
Image

Pic B is hidden so you don't show your campaign setup to all and sundry. BTW, nice campaign!

I will PM you a link from where you can download the DB I created. If you want I can pursue the 500 error in Campaign_Settings.

On the query problems you mention, please let me know your PHP and MySQL version numbers. If you are using Maria, please note that I do not develop for Maria specifically. I only test for MySQL and PHP. My current test versions are PHP v8.3.1 and MySQL v9.0.

Cheers,
4S
IV/JG7_4Shades
SEOW Developer

Image
Rejsyg
Posts: 9
Joined: Sat 10 Sep 2022 2:14 pm

Re: SEDCS 7.3.25 - Errors after connecting to Database / Campaign Settings

Post by Rejsyg »

Pic B is hidden so you don't show your campaign setup to all and sundry. BTW, nice campaign!
Thank you :)
I don't remember where I left off but I think its almost done.
On the query problems you mention, please let me know your PHP and MySQL version numbers. If you are using Maria, please note that I do not develop for Maria specifically. I only test for MySQL and PHP. My current test versions are PHP v8.3.1 and MySQL v9.0.
I just switched over to MySQL 8.0.30 and PHP 8.3.13NTS, the query errors from Maria are gone.
Image
(MySQL 9.1 is giving me "mysql.plugin table" errors unfortunately)

SEDCS updated, and initialized the template without any issues :D
Image

Still seeing the MP-SQL.php error
Image
I will PM you a link from where you can download the DB I created. If you want I can pursue the 500 error in Campaign_Settings.
I would greatly appreciate that.
Are there any other points I should follow in regards to exporting? I'm not sure how much of a difference there is on MariaDB compared to MySQL.
IV/JG7_4Shades
Posts: 2211
Joined: Mon 08 Jan 2007 11:10 pm
Location: Perth, Western Australia

Re: SEDCS 7.3.25 - Errors after connecting to Database / Campaign Settings

Post by IV/JG7_4Shades »

MP-SQL.php error, line 1380
I think I fixed that. Only seemed to crop up on district maps, not on whole sector so I missed it earlier. It was an easy fix. Update your MP using SVN. Should be v7.3.266 now.

MySQL v9.1
I haven't dared go there yet!

500 error in Campaign_Settings
Fixed in SEDCS. Basically your playability tab settings used numbers larger than the max allowed values in some of the slider fields. I increased the max limits. SEDCS v8.0.0.46 is latest version now.

Exporting DB
I use Navicat for MySQL. It is a great tool, well supported and easy to use. But not free. In Navicat I select a DB, right click and choose "Dump SQL File". To import from SQL I choose "Execute SQL File". Working fine for a decade! I have never used MariaDB but I hear it is "pretty similar" to MySQL. The devil is in the detail of course.

Cheers,
4S
IV/JG7_4Shades
SEOW Developer

Image
Post Reply