Problem with the conversion date by default.

Hello

I use JDeveloper 11.1.1.3. I have a 'read-only through sql access' VO in which I defined a query to retrieve the attribute "issuedate" of a table. The query is as follows:
select to_date(issuedate,'dd-Mon-yyyy') issuedate from administration_circulars
I tried using a spreadsheet sql and it worked fine (for example, it returns 'January 16, 13')

However, in my application, I have a system on a chip to display this attribute. When I try to launch the application, I get "13/01/16. Anyone has any idea on this? I even tried to change the format from data of the user interface in the view object to 'none' so far so 'simple' value 'dd-Mon-yyyy', but it works at all.

Thank you

Mohamed.

Have you tried it in a sql worksheet?
It should return the date in the format as a string.

Timo

Tags: Java

Similar Questions

  • What is the problem with the conversion of objects with gradients to the gradient mesh?

    What is the problem with the conversion of objects with gradients to the gradient mesh?

    Radial gradients are special, and it could become difficult edit the gradient mesh resulting.

    Take the layer apnel and inspect your objects. You will find a clipping mask the cracks inside.

  • Problem with the CLOB data type.

    Greetings,

    I am facing a problem with the CLOB data type. I know that the CLOB data type is 4 GB (I use Oracle 9i). But in the Pl Sql procedure, I can only store 34305 size for a CLOB variable character data.

    This is the test script that I am trying to run.

    DECLARE
    -Local variables here*.
    I have INTEGER;
    C_1 CLOB.
    BEGIN
    FOR Rec IN (SELECT
    *
    ACCORDING TO THE TABLE)
    LOOP
    C_1: = c_1 | Rec.Clo_1;
    END LOOP;
    EXCEPTION
    WHILE OTHERS THEN
    Dbms_Output.put_line (SQLERRM);
    END;


    Here variable C_1 range value 34305 good character regardless of type CLOB. Now the above script fails if query my buckle - huge number of return values. It is throwing the exception "error during transfer of files ORA-06502: PL/SQL: digital error or value."

    He would be grateful if someone can help me on this.

    Thank you.

    You are probably better off using DBMS_LOB.append, instead of the concatenation of varchar2 (|).

    And... take off your when-other Manager exceptions, please...

  • problem with the backup data in text file

    Hello

    The problem I am facing wihile, saving the data in the text file is that everytime when I'm slecting the path of the façade, data that are recorded are added with the previous data, not only in the new text, the new data set is saved but also, is there any previuos run for the program , the corresponding data is also present in this text file.

    However, when I change the same ''(file path) to 'constant' in the control block diagram, and then add the path of the file, it doesn't have this problem. Basically, changing the "file path" constant in the diagram of control block (so that it is displayed in the front panel) is at the origin of the problem.

    Help, please!

    Thank you

    Your shift on the loop Register For is not initialized. It will keep the value of the string since the last time that he performed. That initialize and it should solve your problem.

  • Problems with the conversion of Word files to PDF via macro

    I have a weird problem with the Acrobat add-in. I want to convert a lot of files with the Word Add-In in PDF files. The printer is no option because it causes other problems.

    So I created a small macro for Word that transforms all the Word of a directory of files PDF files. The macro works great, but PDF files look right.

    I show you the problem with a Word file, first converted manually, then with the macro:

    First of all the image:  If the file is converted manually, it seems that the Word file and fonts are included.

    convertedManually.png

    Second picture: If the macro converts the file it doesn't seem correct and the fonts are usually not included.

    convertedWithMacro.png

    I use Acrobat XI and Word 2010. The macro command is:

    ' new name for PDF
    pdfName = Replace(Replace(verz & "\" & fi.Name, "docx", "pdf"), "doc", "pdf")
                ' convert Word into PDF
                ActiveDocument.ExportAsFixedFormat OutputFileName:= _
                    pdfName, ExportFormat:= _
                    wdExportFormatPDF, OpenAfterExport:=False, OptimizeFor:= _
                    wdExportOptimizeForPrint, Range:=wdExportAllDocument, From:=1, To:=1, _
                    Item:=wdExportDocumentContent, IncludeDocProps:=False, KeepIRM:=False, _
                    CreateBookmarks:=wdExportCreateHeadingBookmarks, DocStructureTags:=True, _
                    BitmapMissingFonts:=False, UseISO19005_1:=False
    

    I did not, but the trick is to realize you don't want specific action. Rather, you want to treat a directory. DOCX files in the directory will be converted to PDF, then actions (if any).

  • Problems with the Long data type conversion

    With the help of Oracle 11 G.

    I have a vision where one of the name of the column is of type long, I need to convert in varchar2. I tried using the to_Lob() function, but this error:

    ORA-00932: inconsistent data types: expected - got LONG

    I followed this article (step 1), which suggests to use to_lob()

    My query is:
    select
    item1, -- this is of type LONG
    item_vat, 
    price_pc_tot,
    from xd_item_price_view 
    I tried to convert it into:
    select
    to_lob(item1) as item1_x, -- this is of type LONG
    item_vat, 
    price_pc_tot,
    from xd_item_price_view 
    I am confused about the "-", why he would expect that? Thanks for watching it.

    >
    Sorry mate, just realized that. Yep, this is the one I followed (step 1 using to_lob())
    >
    It's a case of 'use' along in a query or search.

    But you can use to_lob as part of creating a new table.

    Response to see Dom Brooks in this thread
    Re: Conversion long to varchar2

    And he directly answered your original question
    >
    But you can't use TO_LOB in a statement SELECT right:

  • Problem with the conversion of the date

    Hello

    I have a column called period_name which is of type varchar which contains data as jan-02 Feb-03 and 05-02, now my requirement is I want convert month names number say jan-02 to 01-02.

    I tried to use to_char (to_date(period_name,'mm/yy'), 'mm - yy') which gives good results to the selection, but when I use the same creation then Sunrise error


    [Error] Run (58:24): ORA-01858: a non-digit character was found here where was waiting for a digital


    Query:

    create the table dumm1 as
    (
    Select to_char (to_date(period_name,'mm/yy'), 'mm - yy') in the period_name of xx_alll
    )

    Concerning

    Published by: 862807 on June 13, 2011 03:30

    862807 wrote:

    Here when I write a select statement which I produced earlier works fine, but when I write the same create in her statement generates an error.

    No it's not.

    You're not extract all lines, you use Toad or some other GUI to confuse you. Enter the results data grid and type CTRL + end to fetch the last row. Or use sqlplus. The selection will fail too.

  • Problem with the registration date and time: only one date is recorded

    Hello community,

    I have the following problem:

    I automatically stores the datetime values in a date column "changed_on", whenever a user saves a form.

    Unfortunately, when I show this value in a form or report, only the correct date is shown. Still, the time is 00:00. There is no time in the database value, too.

    Whenever a user clicks the save button in my form, the value of "changed_on" is generated by a calculation that returns "sysdate" (see image below).

    I think I tried everything now, but I can't understand how to record the date and time correctly. I already tried the format for the changed_on field mask to my preferred format, but it does nothing (jj. MM YYYY HH24).

    How can I automatically record the date and time?

    You need two things.

    1. put the mask of the P3_CHANGED_ON element to JJ. MM YYYY HH24

    2. change your source of calculation to

    TO_CHAR (sysdate, ' DD.) MM YYYY HH24 ')

    In this way, what holds the element and implicit conversion happens when recording records will match.

    Thank you

    -Jorge

  • Problem with the PrintJob background and default

    Hello, I have a problem with PrintJob - print in pdf format.

    I want to print bitmaps with transparency and vectors.

    I checked all the options and still have a gray background under the bitmaps and vectors. This is the background color from scene.

    It seems to me that flash is printing in bitmap mode no matter what I do.
    Anyone know how to print MovieClip/Bitmap without default background. I send to print bitmap/movieclip with transparency, but the output is always packed bitmap.

    var pj:PrintJob = new PrintJob();
    var sheets:MovieClip;// = new Sprite();
    var options:PrintJobOptions = new PrintJobOptions();
    options.printAsBitmap = false;
    var dodd:MovieClip = new MovieClip();
    stage.addChild(dodd);
    var pagesToPrint:uint = 0;
    if (pj.start()) {
        for (var i:int = 0; i < pages.length; i++)
        {
            sheets = new MovieClip();
            //sheets.graphics.beginFill(0xFF0000, 0);
            //sheets.graphics.beginBitmapFill(pages[i].getChildAt(0).bitmapData, null, false, true);
            /*sheets.graphics.lineStyle(0,0,0);
            sheets.graphics.drawRect(0, 0, pj.pageWidth, pj.pageHeight);
            sheets.graphics.endFill();*/
            sheets.addChild(pages[i]);
            dodd.addChild(sheets);
            try {
                pj.addPage(sheets, new Rectangle(0, 0, pj.pageWidth, pj.pageHeight) , options);
                pagesToPrint++;
            }
            catch(e:Error) {
                // do nothing
            }
        }
        if(pagesToPrint > 0) {
            pj.send();
        }
       
        while(dodd.numChildren>0){
            dodd.removeChildAt(0);
        }
        stage.removeChild(dodd);
        dodd = null;
       
    }
    
    

    using actionscript, create "pages" with a white background and content you want, and then print these new pages.

  • Problem with the conversion of pdf to IBR

    Hi, I have problem with IBR excel file conversion. File do not have a password, but in newspapers, I have:
    Manager of tasks/7 02.14 10:46:19.732 TaskLauncher_CmdLineConversion_44409_exsimple_stderr read 72 bytes: EXOpenExport() failed: file is password protected or encrypted (0x000B)
    Excel has macro and security for the worksheet.

    I can't find any post or information about it.
    Any idea, documentation?

    refer to http://docs.oracle.com/cd/E23549_01/doc.1111/e10800/c03_pdfi_all.htm#CIHCGCJA

    "To avoid a conversion of a file Microsoft Office expired, all functions that require a user input must be disabled. It is password protection, security notifications, such as disabling macros, and requests for online access to show online content or participate in programs of feedback from users. For more information about how to disable these and other similar goods, refer to Microsoft documentation for each product. »

  • Problem with the clouds data collector

    Hello.

    I installed the chargeback and cloud data collector.

    This data collector does not actually...

    In the newspapers, I have a message table or view does not exist... I guess that something is wrong with the database scripts...

    I have attached the logs...

    Concerning

    Sebastian

    Hi Sebastian,.

    Looking at the file attached vCloud - DC.log, it is clear that the data collector vCloud you use is not vCenter Chargeback 1.5 GA release, but it's the beta version of vCenter Chargeback 1.5. This is probably the reason this vCloud data collector works well for you with VMware vCloud Director 1.0 beta release.

    So, make sure that you use the Chargeback 1.5 GA release vCenter vCloud data collector.

    Once you start using the data collector more recent vCloud, also make sure that VMware vCloud Director 1.0 database to which you are connecting from vCloud data collection has a view defined with name 'CB_EVENT_LIST_RAW_VIEW '.

    I hope this helps. Please do not hesitate to come back if your problem is still not resolved

    Kind regards

    Amrainder

  • problems with the link Date variable

    I am using a Date as a variable binding in a display object, and I'm running into difficulty. I have the binding variable type defined to date and the control flags for the Type of Format and Format defined respectively on 'Date of Simple' and 'yyyy-MM-dd ". When I run the application test module and enter the date in the correct format, the View object returns the expected results. However, when I try to set a property to bind the query for a group of JHeadstart parameters in my definition of the application in order to highlight the variable to an input dateField control bind, I get the following exception:

    30 Jan 08:49:56 (ErrorReportingUtils) ERROR - java.lang.IllegalArgumentException
    at java.sql.Date.valueOf(Date.java:104)
    at oracle.jbo.domain.Date.toDate(Date.java:348)
    to oracle.jbo.domain.Date. < init > (Date.java:279)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0 (Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
    at oracle.jbo.domain.TypeConvMapEntry.convert(TypeConvMapEntry.java:73)
    at oracle.jbo.domain.TypeFactory.get(TypeFactory.java:739)
    at oracle.jbo.domain.TypeFactory.getInstance(TypeFactory.java:90)
    at oracle.jbo.common.VariableImpl.convertToJava(VariableImpl.java:546)
    at oracle.jbo.common.VariableValueManagerImpl.doSetVariableValue(VariableValueManagerImpl.java:182)
    at oracle.jbo.common.VariableValueManagerImpl.setVariableValue(VariableValueManagerImpl.java:223)
    at oracle.jbo.common.VariableValueManagerImpl.setVariableValue(VariableValueManagerImpl.java:229)
    at oracle.jheadstart.model.adfbc.v2.JhsApplicationModuleImpl.applyBindParams(JhsApplicationModuleImpl.java:173)
    at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at oracle.adf.model.binding.DCInvokeMethod.invokeMethod(DCInvokeMethod.java:507)
    at oracle.adf.model.binding.DCDataControl.invokeMethod(DCDataControl.java:1795)
    at oracle.adf.model.bc4j.DCJboDataControl.invokeMethod(DCJboDataControl.java:1989)
    at oracle.adf.model.binding.DCInvokeMethod.callMethod(DCInvokeMethod.java:219)
    at oracle.jbo.uicli.binding.JUCtrlActionBinding.doIt(JUCtrlActionBinding.java:1289)
    at oracle.adf.model.binding.DCDataControl.invokeOperation(DCDataControl.java:1802)
    at oracle.jbo.uicli.binding.JUCtrlActionBinding.invoke(JUCtrlActionBinding.java:627)
    to oracle.adf.model.binding.DCInvokeActionDef$ DCInvokeAction.refresh (DCInvokeActionDef.java:140)
    at oracle.adf.model.binding.DCBindingContainer.internalRefreshControl(DCBindingContainer.java:2521)
    at oracle.adf.model.binding.DCBindingContainer.refresh(DCBindingContainer.java:2260)
    at oracle.adf.controller.v2.lifecycle.PageLifecycleImpl.prepareRender(PageLifecycleImpl.java:534)
    at oracle.adf.controller.faces.lifecycle.FacesPageLifecycle.prepareRender(FacesPageLifecycle.java:98)
    at oracle.jheadstart.controller.jsf.lifecycle.JhsPageLifecycle.prepareRender(JhsPageLifecycle.java:1155)
    to oracle.adf.controller.v2.lifecycle.Lifecycle$ 1.execute(Lifecycle.java:297)
    at oracle.adf.controller.v2.lifecycle.Lifecycle.executePhase(Lifecycle.java:116)
    to oracle.adf.controller.faces.lifecycle.ADFPhaseListener.mav$ executePhase(ADFPhaseListener.java:29)
    to oracle.adf.controller.faces.lifecycle.ADFPhaseListener$ 1.before(ADFPhaseListener.java:426)
    at oracle.adf.controller.faces.lifecycle.ADFPhaseListener.beforePhase(ADFPhaseListener.java:77)
    at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:228)
    at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:137)
    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:214)
    at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)
    at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:162)
    at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:15)
    at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._invokeDoFilter(AdfFacesFilterImpl.java:228)
    at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._doFilterImpl(AdfFacesFilterImpl.java:197)
    at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl.doFilter(AdfFacesFilterImpl.java:123)
    at oracle.adf.view.faces.webapp.AdfFacesFilter.doFilter(AdfFacesFilter.java:103)
    at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:621)
    at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370)
    at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:871)
    at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:453)
    at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:221)
    at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:122)
    at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:111)
    to oracle.oc4j.network.ServerSocketReadHandler$ SafeRunnable.run (ServerSocketReadHandler.java:260)
    to com.evermind.util.ReleasableResourcePooledExecutor$ MyWorker.run (ReleasableResourcePooledExecutor.java:303)
    at java.lang.Thread.run(Thread.java:595)


    However, it seems that the value of the parameter link has actually changed, according to the message issued by the procedure JhsApplicationModuleImpl.applyBindParams (...) debugging:

    30 - Jan 08:46:23 DEBUG (JhsApplicationModuleImpl) - ViewObject ViewObj: bind move_date param value has changed: old value = null, new value = Wed Jan 07 00:00:00 CST 2009



    One thing I noticed that may be of interest - if I run the debugger in the procedure JhsApplicationModuleImpl.applyBindParams (...), a default date in my link variable arises as an object of oracle.jbo.domain.Date when it comes out of the next line:

    Object oldValue = vo.ensureVariableManager () .getVariableValue (key);

    as opposed to the new value that is sent from the input value of the dateField control, which presents itself as a java.util.Date in the following line:

    Object value = args.get (key);



    In the chain of functions leading to the following in the stack trace:

    at java.sql.Date.valueOf(Date.java:104)
    at oracle.jbo.domain.Date.toDate(Date.java:348)
    to oracle.jbo.domain.Date. < init > (Date.java:279)

    It seems that the value of the java.util.Date is converted to a string and then passed to these functions to be turned into a java.sql.Date object. However, depending on the function of java.sql.Date.valueOf (...), it is expected date format "yyyy-mm-dd", by the header comments:
    /**
    Converts the date a string in JDBC escape format to
    * a Date < code > < code > value.
    *
    s @param a String < code > < code > object representing a date in
    * in format "yyyy-mm-dd".
    * @return a java.sql.Date < code > < code > object representing the
    * date
    * @throws IllegalArgumentException if the specified date is not in the
    * Exhaust JDBC date (yyyy-mm-dd) format
    */

    When the input value of the entered dateField control is added as a java.util.Date, the toString() is produce the incorrect date format, that could be seen in the debug output I've included above that says that the binding variable has changed.



    Anyone done this before that can has let me know what Miss me and how to fix it? I have search everywhere on the web, and all the articles I've seen related to bind variables only refer to those of the digital types or string, that are not giving me problems. Same article of "5.9 Using Bind Variables Named" Developer's Guide (http://database.in2p3.fr/doc/oracle/Oracle_Application_Server_10_Release_3/web.1013/b25947/bcquerying009.htm) do not reference using a Date type.

    I had the same problem on a year (using JHeadstart 10.1.3.2.52):

    15 Feb 14:10:31 DEBUG (JhsApplicationModuleImpl) - research component corresponds to the bind param query SubjectenKernPeildatum, value set for 2000-01-01
    ..
    15 Feb 14:10:33 DEBUG (JhsApplicationModuleImpl) - the execution of applyBindParams for BasServiceKern.AdresRollenSubjecten
    15 - Feb 14:10:33 DEBUG (JhsApplicationModuleImpl) - ViewObject AdresRollenSubjecten: bind peildatum param value has changed: old value = null, new value = Sat Jan 01 00:00:00 THIS 2000
    ..
    15 Feb 14:10:33 ERROR (ErrorReportingUtils) - java.lang.IllegalArgumentException
    at java.sql.Date.valueOf(Date.java:104)
    at oracle.jbo.domain.Date.toDate(Date.java:348)

    It appears a java.util.Date is put on the map criteria in the searchBean, this cannot be used as input for a Houston. Bindvariable date.

    My ugly solution was to substitute ' public void applyBindParams (String voUsage, HashMap args)
    in MyProjectApplicationModuleImp (which extends from JhsApplicationModuleImpl of course).
    Check if the value is a java.util.Date, then
    value = new java.sql.Date (((java.util.Date) value) .getTime ());

    Hello, HJ

    Published by: HJHorst on February 6, 2009 12:22 AM

  • Problem with the dashboard Date invites

    Hello

    I have a date field that I would like to filter, but the problem is I want to enter the start and end date in 2 variables which I can use it in my report. I tried to use between it funtion of the dash prompt, but it does not allow you to enter the start and end date. Then I tried to use 2 limes for start date and end date, but the guest does not allow me to add the same column twice. Can someone please help me because the way in which we can enter the values of some variables?

    Thank you.

    Hello..

    One thing Casting date timestamp with casting (date as a timestamp) is not possible...
    I don't know why you can't apply normal filter on your ABC column instead of the filter inside your fx ...
    If you really think the requirement of the use of domestic filters then you must have little...
    1. the column on which you want to apply the FILTER must be aggregated column (XYZ) of your SPR..., this column needs and should be SUM or AVG or COUNT... etc, aggregates...
    2. the ABC column shouldn't be a fellow...

    Now... come to your problem...
    Without manually write...
    Select your fx of measure, and then click FILTER...
    Select your criteria ABC...
    Click the Add tab > varies > Presentation
    Here you write the quick name without using braces or symbol @... just as usual the name you gave it invites...
    Click OK, then OK again... always the error here? (do not throw anything)
    And what is the data type of the CBA, is this date?, if you find the format of this column showing how the data in the same format of your quick dashboard or not?
    If it isn't... you must divide the characters date and concatenate all part of getting a variable presentation...
    According to my knowledge it must not go that far...

    Hope this helps you...
    Otherwise feel free to share your problems here... ;)

    And please give points to the people who helped you to your latest posts...
    ALL THE BEST

    Thank you & best regards
    Kishore Guggilla

  • problem with the blob data type

    Hello
    Hi just created a blob table data type and insert a text file of the directory - file "DG" and text contain text "Hello dba.

    CREATE TABLE blob_sample (id, NUMBER, blob_data BLOB);

    DECLARE
    l_bfile BFILE.
    l_blob BLOB;
    BEGIN
    INSERT INTO blob_sample (id, blob_data)
    VALUES (1, empty_blob())
    RETURN blob_data INTO l_blob;
    l_bfile: = BFILENAME ("'DG', ' hello.txt");
    DBMS_LOB. FileOpen (l_bfile, Dbms_Lob.File_Readonly);
    DBMS_LOB. LoadFromFile (l_blob, l_bfile, DBMS_LOB.getlength (l_bfile));
    DBMS_LOB. FileClose (l_bfile);
    COMMIT;
    END;
    /

    SQL > select * from blob_sample;
    ID BLOB_DATA
    1 68656C6C6F206462612773

    Above is coded image shape & I try this with the Insert as below... IT WORKS
    SQL > insert into blob_sample (id, blob_data) values (1, '68656C6C6F206462612773');

    1 line of creation.


    But this does not work when encoded length is too large (size 10 KB text file or more)

    It returns error

    insert into blob_sample (blob_data) values ('416374697
    *
    ERROR on line 1:
    ORA-01704: string literal too long


    Please HELP how how can I insert with this method

    Published by: Mr. singh on 9 October 2012 18:54

    Published by: Mr. singh on October 9, 2012 19:38

    It does not make sense to try to build a literal string that represents the binary data in a GIF file and that insert a BLOB using an INSERT... Statement of VALUES.

    You can use the first approach (dbms_lob.loadfromfile) to load a GIF file (or any file) into a BLOB.
    If the image you are trying to load is not a file on the filesystem of database, you can use SQL * Loader on the client machine to load the data, or you can write an application in any language you want that reads the data from the file and inserts it into the BLOB by using the API in your language / framework. You have not told us what language and framework you use, but it shouldn't be too hard to find a suitable example. For example, if you use Java and JDBC, here is an example of loading a GIF in a table.

    Justin

  • Problem with the BLOB data as type. JPEG file

    If im my current procedure, I am creating an XML file with an assortment of blob as .jpeg file. The issue I'm having is that the .jpeg created files seem to somewhat corrupt, which means that some images are missing part of their pixels/bytes(not sure what the correct term here is). So basically, the images are output with some parts of them are cut.
    -------------------------------------------------------------------------

    * Note:
    The file BLOB look good when you view them in my table
    Length in bytes of BLOB is all WAY less 32000 (each is about 8 k)
    -------------------------------------------------------------------------



    Here's some of my code that can help to give a better idea of how things work...
    Oracle: 10.2 g

    Here's my loop for
      For ii in 1..player_results.count loop
                                  
                                   --Outputs Bloop File
    
                                   xBlobFileType := utl_file.fopen (xFilePath, player_results(ii).hmi_player_filename , 'W', 25000 );
                                   dbms_lob.read         (player_results(ii).heat_map_image, xAmt, xPos, xBuffer);
                                   utl_file.put_raw       (xBlobFileType, xBuffer);
                                   utl_file.fclose          (xBlobFileType);
                                  
                                 --Prints data for XML file 
                                  utl_file.put_line (xFile, lpad('  ' ,xParentIndent, ' ') || '<player>');
                                  etc...
    This is the query that fills the BLOB file and the XML data
        
            select  gs.distance_run,
                      gs.avg_speed,
                      gs.possession,
                      gs.heat_map_image, --BLOB File
                      gs.team_id,
                      s.home_team_id,
                      s.home_team_id_1032,
                      s.away_team_id,
                      s.away_team_id_1032,
                      s.game_code,
                      s.game_code_1032,
                      (case
                                  when gs.team_id = s.home_team_id then
                                  IMAGE_NAME_HOME$' || s.game_code_1032 
                                                                    || s.home_team_id_1032 
                                                                    || xBlobNameExt
                                  else
                                  'IMAGE_NAME_AWAY$' || s.game_code_1032 
                                                                    || s.away_team_id_1032 
                                                                    || xBlobNameExt
                                  end
                                  ) hmi_team_filename
              bulk collect into team_results
              from   
                      soccer.soccer_optical_team_gm_stats gs,
                      customer_data.cd_soccer_schedule s
              where   gs.game_code = xGID
              and     gs.game_code = s.game_code 
              order by decode(gs.team_id - s.home_team_id, 0, 0, 1) desc;
    Published by: user652714 on April 10, 2009 10:56

    Explanation in comments

    delcare
       xAmt binary_integer := 25000
    begin
       loop
          dbms_lob.read(...,xAmt,...);
          -- at this point xAmt is the number of bytes or characters read, not necessarily 25000
          ....
          xAmt := 25000;  -- <--- try adding this at the end of your loop (or the appropriate location)
       end loop;
    end;
    

    Could you post the whole code of procedure block?

Maybe you are looking for