Checking whether data exists in a BLOB type database column in Forms 6i

I am developing an application regarding inventory of a plant's spare parts. I am storing photo (.bmp) of spares in the database in a column of BLOB type. Once user punches spare's code, form displays spares data on screen using EXECUTE_QUERY. At this stage I want to check whether picture (.bmp) data was found in BLOB type database column or not. I want to take action accordingly. How to check this. If it would be a numeric column, I would have checked NULL but NULL does not work with BLOB type coloumns.
Pl. help.
Thanks in anticipation.

Did you look in the database documentation? The DBMS_LOB package has the method you need: getlength().
This was more of a database question than a Forms question, so you'd probably have more luck with these types of questions on one of the other forums, like the database or SQL forums.
Regards,
Robin Zimmermann
Forms Product Management

Similar Messages

  • Pre populate an item with source type="Database Column"

    Hello gurus,
    How can I pre populate an item with source used "Always, replacing any..." and source type="Database Column"?
    I have a form that creates/updates rows in a table and when creating a new row I want to populate some of the fields based on some parameters from the previous page. How can I achieve this?
    I tried adding a conditional process when PK is null and populate the expected fields, but in the browser they are not shown with those values, even if I look into the session I can see that they have the values assigned in the process ?!?!?!
    Thanks in advance,
    Florin

    Florin,
    Use the Default Value item attribute. In you case, set the Default Value Type to Static Text with Session State Substitutions and enter your item using the &P1_ITEM_NAME. syntax in the Default value text box.
    Thanks,
    - Scott -

  • Check whether element exists in hierarchy

    Hi together,
    I've got a profit center hierarchy in BW and I need to develop a function module to check, whether a profit center exists under a certain hierarchy node.
    Does anyone has an approach how to do that?
    Kind regards
    Stefan

    HI Stefan,
    You can do it in 2 ways:-
    <b>1)</b> Use the Function Module <b>'G_SET_TREE_IMPORT'</b>
    <b>  CALL FUNCTION 'G_SET_TREE_IMPORT'
        EXPORTING
          no_descriptions = ' '
          no_rw_info      = 'X'
          setid           = p_setid
        TABLES
          set_hierarchy   = lt_hier
          set_values      = lt_val.</b>
    here, in lt_hier table you will get all the Nodes and in lt_val talbe you will get all the values under that nodes, so loop the lt_val Internal talbe and see whether the value is existed or not.
    <b>2)</b> you can use SETNODE and SETLEAF tables to get the value and the Hierarchy Node.
    i will show the way how to do this
    By using the Fm you will get all the nodes and the values, so loop that internal tales and get waht you want and if you want to check a profit center then use the table SETLEAF, you will get the child node, then use the SETNODE to get the next node for that node. do like this up to get the parent node.
    Hope you understand my point
    Regards
    Sudheer

  • Is there any function to check whether table exist in the dictionary

    In the program, i want to dynamicly check whether the table exists in the dictionary, and return the result to me.

    hi
    good
    i dont think there is any such function to check the presence of the table.
    bcz you can check it directly in se11 rather than using any function.
    thanks
    mrutyun^

  • How to check whether file exist or not?

    hello,
    i wanted to know that how can i check whether a file exist or not independent of underlying Operating system?
    please help .
    Thank you.

    Use exists() on a File instance.

  • FM to check whether directory exist on both PC and AS??

    hi all,
    I want to check the directory name given by user. basically its an option, it cud be either for Application server or PC. I want to knw if any FMs exist for the same.
    One i knw is CL_GUI_FRONTEND_SERVICE but i dont knw the implementation.
    Also wud it be different FMs for application server and PC?
    thanks and regards,
    Gaurav

    Hi,
          <b>Pick up the file path from the presentation server</b>
    FORM f1000_browse_presentation_file .
      CONSTANTS: lcl_path TYPE char20 VALUE 'C:\'.
      CALL FUNCTION 'WS_FILENAME_GET'
        EXPORTING
          def_path         = lcl_path
          mask             = c_mask  "',.,..'
          mode             = c_mode
          title            = text-003
        IMPORTING
          filename         = p_f1
        EXCEPTIONS
          inv_winsys       = 1
          no_batch         = 2
          selection_cancel = 3
          selection_error  = 4
          OTHERS           = 5.
      IF sy-subrc <> 0.
      File does not exist
        flg_pre = c_x.
      ENDIF.
    ENDFORM.                    " f1000_browse_presentation_file
    *&      Form  f1001_browse_appl_file
          Pick up the file path from the application server
    FORM f1001_browse_appl_file .
      DATA:  lcl_directory  TYPE char128.
      lcl_directory  = p_direct.
      CALL FUNCTION '/SAPDMC/LSM_F4_SERVER_FILE'
        EXPORTING
          directory        = lcl_directory
          filemask         = c_mask
        IMPORTING
          serverfile       = p_f2
        EXCEPTIONS
          canceled_by_user = 1
          OTHERS           = 2.
      IF sy-subrc <> 0.
       MESSAGE e000(zmm) WITH File does not exist
       flg_app = 'X'.
      ENDIF.
    ENDFORM.                    " f1001_browse_appl_file
    Reward points if this Helps.
    Manish

  • Help for ADF data binding with MySQL BLOB type.

    Hi,
    I have a blob column called photo for table person in my MySQL database, with ADF, I want to bind this column with a JUImage control, but when I drag the column attribute from the data control palete as a JUImage, an error dialog appears, it says:
    Control cannot be bound to that Attribute.
    This control should be bound to an Attribute whose Java type is one of the following
    oracle.ord.im.OrdImageDomain
    oracle.jbo.domain.BlobDomain
    oracle.jbo.domain.Raw
    What should I do ?
    Thanks.

    Hi,
    Are you using BC4J as the persistence layer? If you use your own persistence (e.g. a bean) then you need to make sure the datatype of the atribute is defined as one of the three mentioned in your question.
    Frank

  • Javascritpt to check if data exists before entering

    I have a form that users fill out..
    I want the first (user_ID)field to kick off a javascript that:
    1. makes it upper case while typeing (this I have working):
    onKeyUp="javascript:this.value=this.value.toUpperCase();"
    2. runs a select statement to see if it exists in the table, if not goto next select, if it does exist goto page 2 which pulls it in for editing..
    3. runs a select that errors if its not a valid ID..
    I don't want the field on a page by itself that is submitted first.. (that would obviously be the easiest solution)
    I've tried creating a hidden button, and submitting that button with javascript doSubmit(HIDDEN), but I can't seen to get the onKeyUp and onChange to work at the same time
    and I don't want to query the database with every keystroke..

    was able to get it to work with onBlur (dont know why onChange wouldn't work)
    onKeyUp="javascript:this.value=this.value.toUpperCase()" onBlur="javascript:doSubmit('HIDDEN');"

  • How to check whether file exist in a folder at the application server

    Hi to all experts.
    if suppose there is a file at the application server test.txt my requirement if the one more file is created of the same name before overwriting the file a warning message is to displayed to the user that the file already exist .
    how to do it

    HI Mohammed,
    use The FM DX_FILE_EXISTENCE_CHECK
    or static class CL_GUI_FRONTEND_SERVICES=>FILE_EXIST
    For more info
    search file in application server
    application server
    hope it helps you.
    Regards!

  • URGENT!!! how to check whether file exist or not on client side?

    hello,
    i am building appilication using JSP and javabeans.
    Problem is my application is like on server files are there for say colors and their corresponding car image in that color.so when i move my mouse over that particular color ,its corresponding car image is displayed.
    now say someone has deleted that corresponding car image file but image of color is there...........
    so i have to handle such excpetion.
    like if corresponding car image for that color is not there then that color image should also not be displayed.
    i dont want to do this checking on server side.
    pls help me!!!!!!

    You don't have access to the client files. It is a security violation in a normal internet environment. Imagine what people could do to your computer if they could see everything on it.

  • How to display .doc/.xls file uploaded using blob type of column in table.

    Hi,
    Here
    http://www.oracle.com/technology/obe/apex/apex31nf/apex31blob.htm
    I learnt about uploading & viewing file through BLOB in a form or report . It works fine for pictures & notepad file. But when i upload word file (i.e. *.doc) or excel file ( *.xls ) , and try to view it through DOWNLOAD
    it gives message box
    ' Do you want to save this file, or find program online to open it?'
    I searched lot but enable to find proper & easy to understand solution.
    Hope understand my problem.
    Thanks in advance.

    Hi,
    I am using table emp having fields id,name,,,,,,,,,photo,mimetype,filename,last_update_date.
    photo is of type BLOB. I updated photo (text item) on form.
    I Used BLOB DOWNLOAD Format Mask with appropriate entries & selected display as Attachment.
    So my problem is partially solved. Now if DOWNLOAD link on Form is clicked it displays Excel sheet
    in different window. But still, DOWNLOAD link on my Interactive report not working properly.
    DOWLOAD on interactive if it is clicked it has two problems
    1) It opens image or notepad file in same window.
    2) Not able to open Excel sheet.
    thanks for reply.

  • How to check whether java.sql.Connection has been dropped or not

    Hi,
    How can i check whether the connection is dropped from the database or not by using java.sql.Connection API.
    Thanks

    There's a few ways to check Connections, each with a different use:
    (1) conn.isOpen()
    (2) conn == null
    (3) the last one is a little more involved and adds some overhead. You can run SELECT 1 FROM dual; (Oracle) or SELECT 1 (MSSQL) and check for exceptions.
    The only way to check a connection, as far as I know, is to use it. That said, there must be a better way???

  • Problem with item of type DB column, reinitialized in a process

    Hello,
    I have a problem with an item P216_username with source type=database column(empty in this case). In a process On Load-After Header(with a sequence number bigger then the Fetch Row sequence number) , I change the value of this item:
    :P216_USERNAME := 'custom_value';
    When I run the page, I see the item P216_USERNAME with the value from the database column(empty), instead of attributed value from the process('custom_value').
    Here is a copy of the page in a debug mode:
    0.00: Session: Fetch session header information
    0.00: ...Metadata: Fetch page attributes for application 107, page 216
    0.00: Fetch session state from database
    0.00: Branch point: BEFORE_HEADER
    0.00: Fetch application meta data
    0.01: Computation point: BEFORE_HEADER
    0.01: Processing point: BEFORE_HEADER
    0.01: Show page template header
    0.01: Computation point: AFTER_HEADER
    0.01: Processing point: AFTER_HEADER
    0.01: ...Process "Fetch Row from CONSULTANT_ALLOCATION_PERIODS": DML_FETCH_ROW (AFTER_HEADER) F|#OWNER#:CONSULTANT_ALLOCATION_PERIODS:P216_ALLOCATION_PERIOD_ID:ALLOCATION_PERIOD_ID
    0.01: ...Process "Initialize Username": PLSQL (AFTER_HEADER) begin :P216_USERNAME := 'custom_value'; htp.p(:P216_USERNAME); end;
    custom_value PrintLogout
    0.01: Computation point: BEFORE_BOX_BODY
    0.01: Processing point: BEFORE_BOX_BODY
    0.01: Region: Edit Allocation Period
    Edit Allocation Period Cancel
    Create
    0.02: Item: P216_ALLOCATION_PERIOD_ID HIDDEN
    0.02: Item: P216_USERNAME TEXT
    Username
    0.02: Item: P216_START_DATE PICK_DATE_MM_DD_YYYY
    Start Date
    0.02: Item: P216_END_DATE PICK_DATE_MM_DD_YYYY
    End Date
    0.02: Item: P216_COMMENTS TEXTAREA
    Comments
    custom_value ''
    0.02: Computation point: AFTER_BOX_BODY
    0.02: Processing point: AFTER_BOX_BODY
    0.02: Computation point: BEFORE_FOOTER
    0.02: Processing point: BEFORE_FOOTER
    0.02: Show page tempate footer
    If you had this problem, or you know where it comes from, please answer.
    Thank you.

    Hi,
    Tomáš : I noticed that if i change the Source Used to 'Only when current value in session state is null' it works but I dont think its a normal behaviour.
    Scott: Thanks, it's working now with the post computation callculation attribute.
    Thanx for answers,
    Vastiana

  • Error while migrating BLOB type data

    Hi ,
    I am migrating the data from oracle to oracle and both soruce and target tables have BLOB type field.
    I am getting error when I am executing the interface with these blob fields. But My interface is successfull if I am not maaping this blob files.
    Below is the error message.
    ODI-1217: Session BLOB (162501) fails with return code 942.
    ODI-1226: Step BLOB fails after 1 attempt(s).
    ODI-1240: Flow BLOB fails while performing a Loading operation. This flow loads target table IMAGES.
    ODI-1228: Task SrcSet0 (Loading) fails on the target ORACLE connection YAGLD.
    Caused By: java.sql.BatchUpdateException: ORA-00942: table or view does not exist
    Thanks,
    Patel.

    Duplicate of
    Error while migrating BLOB type data

  • How can I check whether or not an database table exists?

    Hi,
    I am new to ABAP programming. And now I want to write an function that check whether an table exists in the dictionary.
    It request the table name was given by the user input. So I have to check it dynamically.
    Please give me some guide if you know about that.
    Thanks.

    Hi,
    All the table names exist in DD02l table.
    Fetch data from DD02l table by passing selectin screen parameter .
    REPORT ysdn_new .
    PARAMETERS: p_tab LIKE dd02l-tabname.
    DATA: v_tab LIKE p_tab.
    SELECT SINGLE tabname INTO v_tab FROM dd02l WHERE tabname = p_tab.
    WRITE v_tab.
    If ypu want to fetch from TADIR table only means you have to pass selection screen parameter in place of obj_name and TABL for OBJECT field.
    SELECT SINGLE tabname INTO v_tab
    FROM TADIR
    WHERE obj_name = p_tab
       AND    object = 'TABL'.
    This is other way of getting table name by passing selection screen parameter
    this will work.
    Please reward points if helpful...
    Regds
    Sivaparvathi

Maybe you are looking for

  • Progressivley worse

    i started out by trying to update my ipod to get better battery life but to install the new software would take 6 hours so i decided to abort that, so i then decided to restore my ipod well after that i connected it to itunes and registered it after

  • Availability check determination XC ----- YC

    While creating SO through va01  for Sales organization = 2100,Distribution channel = 01,division = 01. If you enter sold to party( 583382 ) , ship to party( 583382 ) material( ma896n/a )  order qty = 1 and press enter then give credit card type as VI

  • Organization of movies imported from iPhoto

    I am just a beginner with iMovie, and wanting to start working with movies taken of my kids. Several months ago I set up iMovie for the first time by importing all my movies from iPhoto. I'm really confused as to the organization of my clips in the c

  • Adjusting volume to account for recordings of unequal quality

    I'm creating an iMovie with photo clips and music. I know how to view and adjust volume levels on the audio. Each of the song bits that I'm using are entered at the same volume level. However, during playback, some songs are quite loud and others see

  • My sony SD card got formatted recently with very important images. On top of it we recorded photos a

    my sony SD card got formatted recently with very important images. On top of it we recorded photos again. I am able to see iformation  like the size of the image along with blank thumbnails, but not the actual images. Please HELP. Regards Gunshe Ramc