6 Replies Latest reply: May 8, 2014 6:26 AM by GhanaApexDeveloper RSS

    File Browse Blob Item

    bh56

      Wondering if any on can help me with what I think should something simple that I must be missing.

      I'm using Application Express 4.2.5.00.08.  I'm using the File Browse Item for a blob.  I'm using the "BLOB column specified in Item Source attribute.

      I've got a custom table and am trying to get the MIME Type, Filename, Characterset Column to updated via the Settings that of the File Brows item for the appropriate column.

       

      For whatever reason, it does not seem like the value is getting set from the File Browse action and passed along to the insert statement.  I've verified the column names and when I make updatable and put a value manually the insert works.  I must be looking past what it could be.  I've looked at a number of demo applications and all appear to have the same settings.

       

      Is there a step that I'm missing related to this?

       

      Appreciate any help anybody can offer.

       

      I'v looked at the steps in the user guide as well.

       

       

      A.1 Available Item Types

        • 1. Re: File Browse Blob Item
          scott.wesley

          For whatever reason, it does not seem like the value is getting set from the File Browse action and passed along to the insert statement

          what value? what insert statement?

           

          Do you have a blob in your table when you submit and the save process runs?

           

          I'd suggest building a demo on apex.oracle.com for people to see what you mean.

          • 2. Re: File Browse Blob Item
            bh56

            Scott,

            Thanks for replying.  Sorry for the delay.  Was off the past day.

             

            The issue with the File Browse is on the insert.  I'm getting a ORA-01400: cannot insert NULL into ..... for the filename.  I have the Filename mapped in the File Browse Settings.

             

            I'm trying to troubleshoot what the issue may be.  I'm confused because some demo apps are working in the same workspace.  I created a new table and still get the same error.  I created in a different workspace with 4.2.4.00.08 and It works.  I'm not sure if I'm missing something as it should be a pretty easy thing to add the file browse and link to custom table and corresponding fields.  I just created the same table in apex.oracle.com and getting the same error.  So I'm a bit perplexed.  Not sure if it's a 4.2.5.00.08 with creating new File Browse objects or what the deal is.  Might see if I can see if anyone has posted on Oracle Support as I don't see much mention on the forum related to my topic.

            • 3. Re: File Browse Blob Item
              GhanaApexDeveloper

              Hi bh56,

              As scott rightly said set up a demo on apex.oracle.com  or better still  I suggest you critically look at page 6 of the products page in the Sample Database Application (Packaged Application) as a example.It is really not clear what Data manipulation you are using to get this bug.

              Also you might Look up

              1. 17.10 About BLOB Support in Forms and Reports
              2. Defining and Viewing BLOB Data in Oracle Application Express 3.1

               

              Thanks

              Benjamin.

              • 4. Re: File Browse Blob Item
                bh56

                Thanks for the suggestions.

                I did create in apex.oracle.com and am getting the same error.

                I have looked at the Page 6 in the demo.  But will look a bit more closely.


                Below is the table I'm using.


                As in the section in 17.10.1.1 I am using the Blob Column specific Item Source Attributes.  For the for the Settings(MIME TYpe/Filename/Character Set) Columns, I have mapped to the below table columns.  I did include these columns in the initial mapping in the Form Wizard.  I know it sees them on the table, because when I specific an incorrect column name I get an error.  Everything appears to work until I try to upload a file.  I then get the ORA-01400 on the insert of the record.  It says the File_Name is not specified for the table.

                 

                 

                CREATE TABLE CMS_FILE_DOCUMENTS

                  (

                    FILE_DOC_ID   NUMBER NOT NULL ,

                    CMS_ID        NUMBER NOT NULL ,

                    DOC_TYPE_ID   NUMBER NOT NULL ,

                    ROW_VERSION   NUMBER NOT NULL ,

                    FILE_NAME     VARCHAR2 (500) NOT NULL ,

                    DESCRIPTION   VARCHAR2 (500) ,

                    FILE_MIMETYPE VARCHAR2 (512) NOT NULL ,

                    FILE_CHARSET  VARCHAR2 (512) NOT NULL ,

                    FILE_BLOB BLOB ,

                    FILE_COMMENT  VARCHAR2 (2000) ,

                    DEFAULT_FLAG  VARCHAR2 (1) ,

                    LANG_CODE     VARCHAR2 (2) NOT NULL ,

                    TAGS          VARCHAR2 (2000) ,

                    APPROVAL_FLAG VARCHAR2 (1) NOT NULL ,

                    FILE_SIZE     NUMBER ,

                    CREATE_DATE   DATE DEFAULT SYSDATE NOT NULL ,

                    CREATED_BY    VARCHAR2 (255) NOT NULL ,

                    UPDATE_DATE   DATE DEFAULT SYSDATE NOT NULL ,

                    UPDATED_BY    VARCHAR2 (255) NOT NULL

                  ) ;

                 

                Taking a further look, I do have something:

                I only had the FILE_BLOB item mapped by default.

                I added the MIMETYPE, Filename and characterset, but now I'm getting a ORA-44003: invalid SQL name error now. 

                Will keep reviewing and testing things.

                 

                New source mappings.

                FILE_BLOB:FILE_MIMETYPE:FILE_NAME:FILE_CHARSET

                 

                 

                Source value or expression for the File Browse Item

                FILE_BLOB:FILE_MIMETYPE:FILE_NAME:FILE_CHARSET

                • 5. Re: File Browse Blob Item
                  bh56

                  I'm matching the demo example.  Which differs slightly from the older OBE.  The older example has the other values defined for the Source value or expression.  The current demo one only has the blob column defined.  The older example uses Format Mask of BLOB.  The demo example does not specify this at all.

                   

                  This should be an easy slam dunk to work.  But not sure why it does not work.  I'm modeling after the demo example one setting for setting.

                  • 6. Re: File Browse Blob Item
                    GhanaApexDeveloper

                    Hi,

                     

                     

                    The issue with the File Browse is on the insert.  I'm getting a ORA-01400: cannot insert NULL into ..... for the filename.  I have the Filename mapped in the File Browse Settings.

                    Try this in the properties of the  File Browse...

                    Settings

                    Value Required:No


                    If set to No and the page item is not visible, Application Express will automatically perform a NULL validation when the page is submitted.

                    Thanks

                    Benjamin.