ENGINE_CODE_YEARS FILE,DRIVER('ODBC'),OWNER(gConnectionString),NAME('wp_engine_code_years'),PRE(ECY),CREATE,BINDABLE,THREAD
ECG_ID_KEY KEY(ECY:EGC_ID),DUP,NOCASE
MDL_ID_KEY KEY(ECY:MDL_ID),DUP,NOCASE
ENGINE_CODE_MODEL_YEAR_KEY KEY(ECY:EGC_ID,ECY:MDL_ID,ECY:YEAR),NOCASE
Record RECORD,PRE()
EGC_ID LONG
MDL_ID LONG
YEAR SHORT
END
END
and in Maria DB the statement to create which runs fine.
CREATE TABLE IF NOT EXISTS wp_engine_code_years (
egc_id INT(14),
mdl_id INT(14),
year SMALLINT,
INDEX ecg_id_key (EGC_ID),
INDEX mdl_id_key (MDL_ID),
UNIQUE engine_code_model_year_key (EGC_ID, MDL_ID, YEAR)
);
I would be concerned about the definition of INT(14)
If I read INT - MariaDB Knowledge Base Correctly
then it’s an unsigned 14 digit Integer. A Clarion Long would be a plain INT or INT4
I think ether the SQL definition needs to change to INT4 or maybe use a REAL on the clarion side.
That list is showing you that on the database the field names are id, tmc_id, mdl_id and year. Clarion is expecting to see egc_id, mdl_id and year.
Maybe you created wp_engine_code_years on the database earlier with the wrong definition? Because you now have the “if not exists”, the new definition is not going to overwrite it.
TRANSMISSION_CODE_YEARS FILE,DRIVER('ODBC','/ALLOWDETAILS=TRUE /LOGFILE=odbc.log'),OWNER(gConnectionString),NAME('wp_transmission_code_years'),PRE(TMY),CREATE,BINDABLE,THREAD
TMC_ID_KEY KEY(TMY:TMC_ID),DUP,NOCASE
MDL_ID_KEY KEY(TMY:MDL_ID),DUP,NOCASE
CODE_MODEL_YEAR_KEY KEY(TMY:TMC_ID,TMY:MDL_ID,TMY:YEAR),NOCASE
Record RECORD,PRE()
ID LONG
TMC_ID LONG
MDL_ID LONG
YEAR SHORT,NAME('year')
END
END