#include #include #define OKAY 0 #define ERROR 1 int UpdateSAMBA( ) { char FILE[40]; exec sql begin declare section; varchar timestamp[20]; float samba_phot_l, samba_phot_r, samba_elec_l, samba_elec_r; exec sql end declare section; exec sql declare measure database; exec sql whenever sqlerror goto oraerr; samba_phot_l = 0.1; samba_phot_r = 0.2; samba_elec_l = 0.3; samba_elec_r = 0.4; exec sql at measure update M_ALEPH_SAMBA set timestamp = sysdate, samba_phot_l = round(:samba_phot_l,2), samba_phot_r = round(:samba_phot_r,2), samba_elec_l = round(:samba_elec_l,2), samba_elec_r = round(:samba_elec_r,2); return(OKAY); /* ORACLE ERROR HANDLING */ oraerr: strcpy(FILE,__FILE__); oracle_error(FILE, &sqlca); return(ERROR); }