Creato da pastuweb.com
Share My Page
My Social Accounts
Account FaceBook Account LinkedIn Account Twitter Account Google Plus Account Git Hub

Here there is the procedure:

PROCEDURE insert_video (description   IN   VARCHAR2, src IN BLOB)
   IS
      tmpvar     NUMBER;
      id_video   wh_tvideo.ID%TYPE;
      vid        ORDSYS.ORDVIDEO;
      ctx RAW(64) :=NULL;

   BEGIN
      tmpvar := 0;

      SELECT nextid
        INTO id_video
        FROM DUAL;

      SELECT ORDSYS.ORDVIDEO (description,
                              ORDSYS.ordsource (src, NULL, NULL, NULL, NULL,
                                                1),
                              NULL,
                              NULL,
                              NULL,
                              NULL,
                              NULL,
                              NULL,
                              NULL,
                              NULL,
                              NULL,
                              NULL,
                              NULL,
                              NULL
                             )
        INTO vid
        FROM DUAL;

      -- get the properties to set the member attributes of the ordimage object
--      vid.setproperties (null,TRUE);

      INSERT INTO wh_tvideo
                  (ID, video
                  )
           VALUES (id_video, vid
                  );
                  
SELECT p.video INTO vid FROM wh_tvideo p 
    WHERE p.id  = id_video FOR UPDATE;
    
  vid.setProperties(ctx,FALSE);
  UPDATE wh_tvideo p SET p.video = vid 
    WHERE p.id  = id_video;
                  
   END;

Average (1 Vote)
The average rating is 5.0 stars out of 5.