I got Error in Procedure (Error and Proceure Given Below) (URGENT)

Dear Experts
while compile a procedure I got Erro (Error and Proceure Given Below)
CREATE OR REPLACE PROCEDURE LOAD_IMAGE_LONGRAW
     FILE_NAME     IN     VARCHAR2
AS
     FILE_LOB          BFILE;
     BINARY_LOB          LONG RAW ;
     MIME_TYPE          IMAGESLONGRAW.MIME_TYPE%TYPE;
     EXTENSION_POS          NUMBER;
BEGIN
     -- USE THE EXTENSION OF THE FILE NAME TO DETERMING THE MIME-TYPE
     -- THE MIME-TYPE FOR A .JPG FILE WILL BE IMAGE/JPG
          EXTENSION_POS := INSTR( FILE_NAME, '.' );
          MIME_TYPE := 'IMAGE/' || SUBSTR(FILE_NAME,EXTENSION_POS + 1,LENGTH( FILE_NAME ) );
     -- INSERT A NEW ROW INTO THE IMAGES TABLE. GET THE LOB LOCATOR FOR THE NEWLY INSERTED ROW
     -- WE WILL BE USING THAT TO INSERT THE CONTENT FROM THE FILE.
          INSERT INTO IMAGESLONGRAW( IMAGE_NAME, MIME_TYPE, CONTENT )
          VALUES( FILE_NAME, MIME_TYPE, EMPTY_BLOB() )
          RETURNING CONTENT INTO BINARY_LOB;
     -- OPEN UP THE FILE IN THE IMAGES DIRECTORY NAMED FILE_NAME,
     -- LOAD THAT FILE INTO THE NEWLY CREATED LOB LOCATOR, AND
     -- CLOSE THE FILE
          FILE_LOB := BFILENAME( 'IMAGES_LONGRAW', FILE_NAME ); --BFILENAME() FUNCTION TO CREATE A LOB LOCATOR FOR YOUR EXTERNAL
          DBMS_LOB.FILEOPEN ( FILE_LOB, DBMS_LOB.FILE_READONLY );
          DBMS_LOB.LOADFROMFILE( BINARY_LOB,FILE_LOB,DBMS_LOB.GETLENGTH( FILE_LOB ) );
          DBMS_LOB.FILECLOSE ( FILE_LOB );
END LOAD_IMAGE_LONGRAW;
SHOW ERRORS;
PL/SQL: ORA-00932: inconsistent datatypes: expected NUMBER got BINARY

Name Null? Type
IMAGE_NAME VARCHAR2(100)
MIME_TYPE VARCHAR2(100)
CONTENT LONG RAW

Similar Messages

  • While downloading iOS7.1.2 I got error and I can't download it again. What should Ido ?

    while downloading iOS7.1.2 igot error while installing it and I can't download it again. what should Ido ?

    I've asked your post be redirected.  Classic operating systems refer to Mac operating systems in use prior to 2006.
    iPhone

  • Session bean calls enttity bean got error !!!! *urgent*

    i have a session bean(customerController)with jndi(ejb/customer) calling entity bean (customer).Both using remote interface. when i build a frame application to test these beans. i get the error below.
    can anybody tell me wat happen ?!!
    23:20:22,861 ERROR [LogInterceptor] EJBException: javax.ejb.EJBException: removeCustomer: null      at sessioncallsentitybean.CustomerControllerBean.createCustomer(CustomerControllerBean.java:63)      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:324)      at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:660)      at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:186)      at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:77)      at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:107)      at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:237)      at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:98)      at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:130)      at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:208)      at org.jboss.ejb.StatelessSessionContainer.invoke(StatelessSessionContainer.java:313)      at org.jboss.ejb.Container.invoke(Container.java:738)      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)      at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke
    (JRMPInvoker.java:383)      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:324)      at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:261)      at sun.rmi.transport.Transport$1.run(Transport.java:148)      at java.security.AccessController.doPrivileged(Native Method)      at sun.rmi.transport.Transport.serviceCall(Transport.java:144)      at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)      at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)      at java.lang.Thread.run(Thread.java:536)

    seems like the logic stops when session bean is trying to create an instance of entity bean. i ve set my jndi name (ejb/Customer)correctly in the naming code part in session bean. Can u tell me wat steps that i might have missed. pls. thank you so much. =)
    session bean manages to pass through methods below:
    ejbCreate ()
    createCustomer()
    makeConnection()
    releaseConnection()... but throws the EJBException
    public String createCustomer(String custName, String custEmail, String custAddress, String custGender, String custPhoneNo) throws CreateException {
         System.out.println("CustomerControllerBean createCustomer");
        try{
          makeConnection();
          customer = customerHome.create(customerId, custName,
                     custEmail, custAddress, custGender, custPhoneNo);
          releaseConnection();
        } catch (Exception ex){
          releaseConnection();
          throw new EJBException
          ("createCustomer: " + ex.getMessage());
        return customerId;
      }my error is "javax.ejb.EJBException: createCustomer: null" the rest of the error warning is mentioned in the first posted message above.

  • From validation got error don't understand??

    Hi every one!
    I got an error that I don't understand.
    http://www.globallingua.com.mx/idiomas.php
    http://validator.w3.org/check?uri=http%3A%2F%2Fwww.globallingua.com.mx%2Fidiomas.php&chars et=%28detect+automatically%29&doctype=Inline&ss=1&group=0&No200=1
    Can any body explain me this please, I’m newbie on this
    an the rest of the site don’t got error and was created with
    the same tools.
    Thankx in advanced
    Cheers!

    .oO(speculumcm)
    > I got an error that I don't understand.
    >
    >
    http://www.globallingua.com.mx/idiomas.php
    >
    >
    >
    http://validator.w3.org/check?uri=http%3A%2F%2Fwww.globallingua.com.mx%2Fidiomas
    >.php&charset=%28detect+automatically%29&doctype=Inline&ss=1&group=0&No200=1
    >
    > Can any body explain me this please, I?m newbie on this
    an the rest of the
    >site don?t got error and was created with the same tools.
    Never seen this error before, but one thing that's wrong is
    the missing
    space between the attributes of the 'a' in line 125
    (shortened):
    <a href="javascript:; "onclick="var ...">
    Change it to
    <a href="javascript:;" onclick="var ...">
    HTH
    Micha

  • Got error when use case statement in oracle stored procedure

    Hi,
    I have a query like:
    select merchant_id,
    case
    when product_type='K' then 'Production'
    when product_carrier='UC' THEN 'Shipping'
    end the_type
    from product_tbl
    where merchant_id=10114
    It works fine. But as soon as I put it into a stored procedure, I got error like:
    Encountered the symbol "CASE" when expecting one of the following:
    ( - + mod null <an identifier>
    Please help!

    Oracle 8i doesn't support CASE into PL/SQL, so as Kamal said, create a view with the CASE, and use this view into your PL/SQL.
    Nicolas.
    And an example here :
    Re: Execute Immediate doesnot work in 8i (8.1.7) and Ref Cursor not exec qu
    Sorry Kamal.
    Message was edited by:
    N. Gasparotto

  • How to catch date errors and continue processing in a PL/SQL procedure

    I'm updating a date field with dates constructed from day, month and year fields. The incoming data has many instances of day and month that are not valid dates, ex 11 31 2007. There is no 31st day in November.
    I would like to write a pl/sql script to scan the table containing these values and log the rows that produce conversion errors.
    I thought I could do this with exceptions but there are no exceptions that correspond to the ORA-01847 error for mismatched day and month.
    Here is what I tried (the print procedure is a local wrapper for DBMS_OUTPUT.put_line):
    PROCEDURE date_check IS
    start1 DATE ;
    BEGIN
    select to_date(nvl(yearcollected,'9999') ||'/'|| nvl(monthcollected,'01') ||'/'|| nvl(daycollected,'01'),'YYYY/MM/DD'))) into start1 from incoming_data where id=1 ;
         BEGIN
              update temp_test set test_date = start1 where id=1 ;
         EXCEPTION
              WHEN OTHERS THEN
              print('Date error message from exception block');
         END;
    print('Processing continues after handling date exception') ;
    END date_check ;
    Is there a way to catch this kind of error and continue processing after logging a message?
    -=beeky

    Hi, Beeky,
    There are lots of different error messages associated with bad dates. Rather than try to catch them all, I use a BEGIN ... EXCEPTION block that contains nothing but a TO_DATE call. This is one of the rare occassions when I think "EXCEPTION WHEN OTHERS" is okay,
    The following function comes from a package. If you want to make a stand-alone function, remember to say " *CREATE OR REPLACE* FUNCTION ...".
    --          **   t o _ d t   **
    --     to_dt attempts to convert in_txt (assumed to
    --          be in the format of in_fmt_txt) to a DATE.
    --     If the conversion works, to_dt returns the DATE.
    --     If the conversion fails for any reason, to_dt returns in_err_dt.
    FUNCTION     to_dt
    (     in_txt          IN     VARCHAR2                    -- to be converted
    ,     in_fmt_txt     IN     VARCHAR2     DEFAULT     'DD-MON-YYYY'     -- optional format
    ,     in_err_dt     IN     DATE          DEFAULT     NULL
    RETURN DATE
    DETERMINISTIC
    AS
    BEGIN
         -- Try to convert in_txt to a DATE.  If it works, fine.
         RETURN     TO_DATE (in_txt, in_fmt_txt);
    EXCEPTION     -- If TO_DATE caused an error, then this is not a valid DATE: return in_err_dt
         WHEN OTHERS
         THEN
              RETURN in_err_dt;
    END     to_dt
    ;

  • I just got an iPod 4th generation and Im trying to sync my iTunes songs from my dell laptop on to my iPod but it says I need iTunes 10.6.3. So I tryed to download it on the apple website but it keeps saying that there is an error. Any answers?

    I just got an iPod 4th generation and Im trying to sync my iTunes songs and books from my dell laptop on to my iPod but it says I need iTunes 10.6.3. So I tryed to download it on the apple website but it keeps saying that there is an error. I have already tryed uninstalling all Apple Inc. programs on my laptop then trying to install iTunes again but that has had no success what so ever. I have started to get very frusterated with this . Hopefully someone can help. I would really appreciate it. Any suggestion?

    So I tryed to download it on the apple website but it keeps saying that there is an error.
    What does the error message say? (Precise text, please.)

  • I recently got a new computer because my old one wouldn't let me open creative suite 3 after it generated a error and now I can't deactivate the key to activate it onto my new account.

    I recently got a new computer because my old one wouldn't let me open creative suite 3 after it generated a error and now I can't deactivate the key to activate it onto my new computer. Any help would be appreciated. Thank you.

    You are allowed to have two activted installations, so if the first machine is the only machine with an activated installation there is nothing prohibiting you from installing and activating on the new machine.
    You can contact Adobe Support thru chat to have the old installation deactivation.
    Serial number and activation support (non-CC)
    http://helpx.adobe.com/x-productkb/global/service1.html ( http://adobe.ly/1aYjbSC )

  • I am facing a problem while working in Muse... The issue is I cannot delete a page from my plan, when I am trying to delete it showing an error and the application shuts down. I am working on an emergency project which I got to submit it tomorrow I hope y

    I am facing a problem while working in Muse... The issue is I cannot delete a page from my plan, when I am trying to delete it showing an error and the application shuts down. I am working on an emergency project which I got to submit it tomorrow I hope you will find a solution for the same.Help with using Adobe Muse CC

    Thanks,
    I have tried with a new site it's working perfectly.
    See the screenshot of the error.
    Thanks for your support Rohit

  • When syncing with itunes, got error message saying had error and now ipad2 will not do anything other than showing the USB cable with arrow pointing to Itunes on screen.  have done the reset and restart, but still get same thing.

    when syncing with itunes, got error message saying had error and now ipad2 will not do anything other than showing the USB cable with arrow pointing to Itunes on screen.  have done the reset and restart, but still get same thing.  Ipad does not show up in itunes even though cable plugged in.  Have shut down and restarted Windows 7 computer.

    I had done all of that to no avail.  I did call Apple Tech Support and after he suggested I try a USB port in the rear of the Win 7 computer, things starting working again.  I had tried switching the USB port at the front of the machine but that had not helped.  Everything is good to go again.  thanks for  your reply

  • Tried to update to newest version. I got error because i didn't have this recovery program disc that was supposed to come with the purchase but it didn't and now my ipod touch 8gb won't connect with itunes and is stuck on a connection with itunes screen

    I tried to update to newest version via pc. I got error because i didn't have this recovery program disc that was supposed to come with the purchase so it says, but it didn't and now my ipod touch 8gb won't connect with itunes anymore and is stuck on a screen displaying an itunes icon with a usb icon.

    oke i'm not done with the whole thing, but i'm doing that right now. Most of the advice I've already read didn't work and at a certain point it said something about shutting down programs then restart. but i notice that there are some pretty important system things in that list and i don't want to mess up my pc :s i'm not a pc genius... and because i'm dutch and my pc-language is in dutch I often have trouble translating and well... i don't always understand the technical stuff in all the articles -_-

  • HT201210 I just got a new iPhone 4 and the (-1) error keeps popping up on my screen as it is restoring filmware, what's wrong with it?

    I just got a new iPhone 4 and the (-1) error keeps popping up on my screen as it is restoring filmware, what's wrong with it?

    when you open the app store scroll down to the bottom it will display the apple id currently in use, change it to your normal apple id email

  • I have some problem when I want to download app in iTunes some security question ask me about my visa when I right my visa number I got an errors and on top of the page told me go to iTunes support I do these things and now what should I do

    I have some problem when I want to download app in iTunes some security question ask me about my visa when I right my visa number I got an errors and on top of the page told me go to iTunes support I do these things and now what should I do

    Most of the people on these forums, including myself, are fellow users - you're not talking to iTunes Support here.
    You can contact iTunes Support via this link : http://www.apple.com/support/itunes/contact/ - click on Contact iTunes Store Support on the right-hand side of the page, then Purchases, Billing & Redemption

  • Got error message this Ipod cannot be used because the required software is not installed. Run the Itunes installer to remove Itunes and install the 64-bit version and already have latest version and 64

    Got error message :"This this Ipod cannot be used because the required software is not installed. Run the Itunes installer to remove Itunes and install the 64-bit version"   This is on a new macbook.  I already have the latest version installed and 64 bit.  Help.

    Did you do what the message said?
    Also try using the Win 7/Vista link in the following:
    Removing and Reinstalling iTunes, QuickTime, and other software components for Windows XP

  • I am running Acrobat X Pro on Windows 7 in Parallels. I have tried to install the Acrobat updates, but they won't install. Today I tried to create a pdf from a Word 2013 document and it crapped out. I tried to uninstall Acrobat and got Error 1310. Error w

    I am running Acrobat X Pro on Windows 7 in Parallels. I have tried to install the Acrobat updates, but they won't install. Today I tried to create a pdf from a Word 2013 document and it crapped out. I tried to uninstall Acrobat and got Error 1310. Error writing to file: c:\Config.Msi\feea.rbf. What do I do?

    Hi Beverly ,
    Please refer to the following and see if this helps.
    https://helpx.adobe.com/creative-suite/kb/error-1310-error-writing-file.html
    Regards
    Sukrit Dhingra

Maybe you are looking for

  • Runtime error when i try to execute this program

    I get a runtime error when i run this file using appletviewer. Please help me in getting out of this problem. The runtime errror is: C:\prashanth>appletviewer HelloMedia.java java.lang.NoClassDefFoundError: javax/media/ControllerListener at java.lang

  • How do I add a tool bar button?

    I would like to create a button on the Acrobat X Standard tool bar ribbon on the top of the page that saves the document I'm viewing to a specific directory TIFF format.  I have to do this MANY times per day, a script of this nature would save me MAN

  • Please insert disk adobemastercollection english triall to continue

    somebody help me its been a week i have faild to install adobe cs5 master collection it tells me to to insert disk of adobe master collection english trial to continue,what ever i do it stills says the same thing,thats the problem i encounterd i need

  • The white background makes my eyes hurt. How can I make the background a different color?

    The white background makes my eyes hurt. How can I make the background a different color?

  • HP 8 G2 GPS Desn't Work

    Yet another problem with this tablet: The GPS does not work. Nokia HERE maps: Perpetually "Waiting for GPS".Google Maps can't show location in GPS only mode.GPS Status & Toolbox app never gets past "Looking for GPS location..." Anything to try before