next up previous contents
Next: Query data, then query Up: Code examples Previous: Code examples   Contents

Insert station data, then insert data

      call idba_preparati(dbhandle, handle, "write", "add", "add")
      
c     Insert data about a station
      call idba_setr (handle, "lat", 11.345)
      call idba_setr (handle, "lon", 44.678)
      call idba_setr (handle, "height", 23)
      call idba_prendilo (handle)

c     Read the station ID for the station we just inserted
      call idba_enqi (handle, "ana_id", anaid)

c     Reset the input data
      call idba_unsetall (handle)

c     Add data to the station we just inserted
      call idba_seti (handle, "ana_id", anaid)
      call idba_setlevel (handle, 100, 1, 0)
      call idba_settimerange (handle, 0, 0, 0)
      call idba_setdate (handle, 2006, 06, 20, 19, 30, 0)
      call idba_seti (handle, "t", 21)
      call idba_setc (handle, "B12345", "ciao")
      call idba_prendilo (handle)



root 2007-06-20