next up previous contents
Next: Inserting data Up: Querying the database Previous: Querying the values   Contents

Clearing the database

You can initialise or reinitialise the database using idba_scopa:

c     Start the work with a clean database
      call idba_scopa(handle, "repinfo.csv")

idba_scopa clears the database if it exists, then recreates all the needed tables. Finally, it populates the informations about the reports (such as the available report types, their mnemonics and their priority) using the data in the file given as argument.

The file is in CSV format, with 6 columns:

  1. Report code (corresponding to parameter rep_cod)
  2. Mnemonic name (corresponding to parameter rep_memo)
  3. Report description
  4. Report priority (corresponding to parameter priority)
  5. Ignored
  6. Ignored

If "" is given instead of the file name, idba_scopa will read the data from /etc/repinfo.csv.

This is an example of the contents of the file:

01,synop,report synottico,100,oss,0
02,metar,metar,80,oss,0
03,temp,radiosondaggio,100,oss,2
04,ana_lm,valori analizzati LM,-1,ana,255
05,ana,analisi,-10,pre,255
06,pre_cleps_box1.5maxel001,previsti cosmo leps box 1.5 gradi valore max elemento 1,-1,pre,255
07,pre_lmn_box1.5med,previzione Lokal Model nudging box 1.5 gradi valore medio,-1,pre,255
08,pre_lmp_spnp0,previsione Lkal Model prognostica interpolato punto piu' vicino,-1,pre,255
09,boe,dati omdametrici,100,oss,31

idba_scopa will not work unless rewrite has been enabled for the data when opening the database.



root 2007-06-20