2021-03-08 Fred Gleason <fredg@paravelsystems.com>

* Commented out code to initialize the 'NEXUS_STATIONS' table
	in rddbmgr(8).
	* Fixed a bug in 'CheckSchedCodeRules()' in rddbmgr(8) that
	would throw a SQL error when no schedule codes were defined.

Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
Fred Gleason 2021-03-08 11:51:55 -05:00
parent 548105dbed
commit de570896f1
3 changed files with 27 additions and 9 deletions

View File

@ -21236,3 +21236,8 @@
operation of the progress dialog during log generation. operation of the progress dialog during log generation.
2021-03-08 Fred Gleason <fredg@paravelsystems.com> 2021-03-08 Fred Gleason <fredg@paravelsystems.com>
* Fixed a regression in 'lib/rdconfig.cpp' that broke the build. * Fixed a regression in 'lib/rdconfig.cpp' that broke the build.
2021-03-08 Fred Gleason <fredg@paravelsystems.com>
* Commented out code to initialize the 'NEXUS_STATIONS' table
in rddbmgr(8).
* Fixed a bug in 'CheckSchedCodeRules()' in rddbmgr(8) that
would throw a SQL error when no schedule codes were defined.

View File

@ -1027,6 +1027,19 @@ void MainObject::CheckSchedCodeRules(bool prompt_user) const
QString sql; QString sql;
RDSqlQuery *q; RDSqlQuery *q;
//
// Check that we have at least one schedule code
//
sql=QString("select ")+
"CODE "+ // 00
"from SCHED_CODES";
q=new RDSqlQuery(sql);
if(!q->first()) {
delete q;
return;
}
delete q;
// //
// Check for orphaned rules // Check for orphaned rules
// //

View File

@ -9805,15 +9805,15 @@ bool MainObject::UpdateSchema(int cur_schema,int set_schema,QString *err_msg)
return false; return false;
} }
q=new RDSqlQuery("select NAME from SERVICES",false); // q=new RDSqlQuery("select NAME from SERVICES",false);
while(q->next()) { // while(q->next()) {
sql=QString("insert into NEXUS_STATIONS set ")+ // sql=QString("insert into NEXUS_STATIONS set ")+
"RD_SERVICE=\""+RDEscapeString(q->value(0).toString())+"\""; // "RD_SERVICE=\""+RDEscapeString(q->value(0).toString())+"\"";
if(!RDSqlQuery::apply(sql,err_msg)) { // if(!RDSqlQuery::apply(sql,err_msg)) {
return false; // return false;
} // }
} // }
delete q; // delete q;
sql=QString("insert into IMPORT_TEMPLATES set ")+ sql=QString("insert into IMPORT_TEMPLATES set ")+
"NAME='MusicMaster Nexus',"+ "NAME='MusicMaster Nexus',"+