How to store BDC error messages into oracle database table?

Hello Experts,
I have a peculier requirement wherein I need to store the error messages occured while executing the transaction using BDC (Call Transaction Method) in an Oracle Database table format. Is that possible, if yes, how?
Thanks in advance.

Hi,
Structure of BDCMSGCOLL.
TCODE -> BDC Transaction code
DYNAME -> Batch input module name
DYNUMB -> Batch input screen number
MSGTYP ->Batch input message type
MSGSPRA -> Language ID of a message
MSGID -> Batch input message ID
MSGNR -> Batch input message number
MSGV1 -> Variable part of a message
MSGV2 -> Variable part of a message
MSGV3 -> Variable part of a message
MSGV4 -> Variable part of a message
FLDNAME -> Field name
Ex :
DATA : BDCMSGCOLL TYPE TABLE OF BDCMSGCOLL WITH HEADER LINE,
BDCDATA TYPE TABLE OF BDCDATA WITH HEADER LINE.
CALL TRANSACTION 'MM01' USING BDCDATA MODE N UPDATE S MESSAGES INTO BDCMSGCOLL.
IF SY-SUBRC 0.
PERFORM ERR.
CLEAR I_MSG.
REFRESH I_MSG.
ENDIF.
*& Form ERR
text
--> p1 text
<-- p2 text
form ERR .
DATA V_MSG(255) TYPE C.
READ TABLE I_MSG WITH KEY MSGTYP = 'E'.
IF SY-SUBRC = 0.
CALL FUNCTION 'FORMAT_MESSAGE'
EXPORTING
ID = I_MSG-MSGID
LANG = 'E'
NO = I_MSG-MSGNR
V1 = I_MSG-MSGV1
V2 = I_MSG-MSGV2
V3 = I_MSG-MSGV3
V4 = I_MSG-MSGV4
IMPORTING
MSG = V_MSG
EXCEPTIONS
NOT_FOUND = 1
OTHERS = 2
IF sy-subrc 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
WRITE V_MSG. " Error Message Displayed Here.
CLEAR V_MSG.
ENDIF.
endform. " ERR
hope this will help you.
Reward if found helpfull,
Cheers,
Chaitanya.

Similar Messages

  • How to load excel-csv file into oracle database

    Hi
    I wanted to load excel file with csv extension(named as trial.csv) into
    oracle database table(named as dept),I have given below my experiment here.
    I am getting the following error,how should I rectify this?
    For ID column I have defined as number(5) datatype, in my control file I have defined as interger external(5),where as in the Error log file why the datatype for ID column is comming as character?
    1)my oracle database table is
    SQL> desc dept;
    Name Null? Type
    ID NUMBER(5)
    DNAME CHAR(20)
    2)my data file is(trial.csv)
    ID     DNAME
    11     production
    22     purchase
    33     inspection
    3)my control file is(trial.ctl)
    LOAD DATA
    INFILE 'trial.csv'
    BADFILE 'trial.bad'
    DISCARDFILE 'trial.dsc'
    APPEND
    INTO TABLE dept
    FIELDS TERMINATED BY "," OPTIONALLY ENCLOSED BY '"'
    TRAILING NULLCOLS
    (ID POSITION(1:5) INTEGER EXTERNAL(5)      
    NULLIF ID=BLANKS,
    DNAME POSITION(6:25) CHAR
         NULLIF DNAME=BLANKS
    3)my syntax on cmd prompt is
    c:\>sqlldr scott/tiger@xxx control=trial.ctl direct=true;
    Load completed - logical record count 21.
    4)my log file error message is
    Column Name Position Len Term Encl Datatype
    ID           1:5 5 , O(") CHARACTER
    NULL if ID = BLANKS
    DNAME 6:25 20 , O(") CHARACTER
    NULL if DNAME = BLANKS
    Record 1: Rejected - Error on table DEPT, column ID.
    ORA-01722: invalid number
    Record 21: Rejected - Error on table DEPT, column ID.
    ORA-01722: invalid number
    Table DEPT:
    0 Rows successfully loaded.
    21 Rows not loaded due to data errors.
    0 Rows not loaded because all WHEN clauses were failed.
    0 Rows not loaded because all fields were null.
    Bind array size not used in direct path.
    Column array rows : 5000
    Stream buffer bytes: 256000
    Read buffer bytes: 1048576
    Total logical records skipped: 0
    Total logical records read: 21
    Total logical records rejected: 21
    Total logical records discarded: 0
    Total stream buffers loaded by SQL*Loader main thread: 0
    Total stream buffers loaded by SQL*Loader load thread: 0
    5)Result
    SQL> select * from dept;
    no rows selected
    by
    balamuralikrishnan.s

    Hi everyone!
    The following are the steps to load a excell sheet to oracle table.i tried to be as simple as possible.
    thanks
    Step # 1
    Prapare a data file (excel sheet) that would be uploaded to oracle table.
    "Save As" a excel sheet to ".csv" (comma seperated values) format.
    Then save as to " .dat " file.
    e.g datafile.bat
    1,Category Wise Consumption Summary,Expected Receipts Report
    2,Category Wise Receipts Summary,Forecast Detail Report
    3,Current Stock List Category Wise,Forecast rule listing
    4,Daily Production Report,Freight carrier listing
    5,Daily Transactions Report,Inventory Value Report
    Step # 2
    Prapare a control file that define the data file to be loaded ,columns seperation value,name and type of the table columns to which data is to be loaded.The control file extension should be " .ctl " !
    e.g i want to load the data into tasks table ,from the datafile.dat file and having controlfile.ctl control file.
    SQL> desc tasks;
    Name Null? Type
    TASK_ID NOT NULL NUMBER(14)
    TASK_NAME VARCHAR2(120)
    TASK_CODE VARCHAR2(120)
    : controlfile.ctl
    LOAD DATA
    INFILE 'e:\datafile.dat'
    INTO TABLE tasks
    FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'
    (TASK_ID INTEGER EXTERNAL,
    TASK_NAME CHAR,
    TASK_CODE CHAR)
    The above is the structure for a control file.
    Step # 3
    the final step is to give the sqlldr command to execute the process.
    sqlldr userid=scott/tiger@abc control=e:\controlfile.ctl log=e:\logfile.log
    Message was edited by:
    user578762

  • How to insert a image file into oracle database

    hi all
    can anyone guide me how to insert a image file into oracle database now
    i have created table using
    create table imagestore(image blob);
    but when inserting i totally lost don't know what to do how to write query to insert image file

    Hi I don't have time to explain really, I did have to do this a while ago though so I will post a code snippet. This is using the commons file upload framework.
    Firstly you need a multi part form data (if you are using a web page). If you are not using a web page ignore this bit.
    out.println("<form name=\"imgFrm\" method=\"post\" enctype=\"multipart/form-data\" action=\"FileUploadServlet?thisPageAction=reloaded\" onSubmit=\"return submitForm();\"><input type=\"FILE\" name=\"imgSource\" size='60' class='smalltext' onKeyPress='return stopUserInput();' onKeyUp='stopUserInput();' onKeyDown='stopUserInput();' onMouseDown='noMouseDown(event);'>");
    out.println("   <input type='submit' name='submit' value='Submit' class='smalltext'>");
    out.println("</form>"); Import this once you have the jar file:
    import org.apache.commons.fileupload.*;Now a method I wrote to upload the file. I am not saying that this is correct, or its the best way to do this. I am just saying it works for me.
    private boolean uploadFile(HttpServletRequest request, HttpSession session) throws Exception {
            boolean result = true;
            String fileName = null;
            byte fileData[] = null;
            String fileUploadError = null;
            String imageType = "";
            String error = "";
            DiskFileUpload fb = new DiskFileUpload();
            List fileItems = fb.parseRequest(request);
            Iterator it = fileItems.iterator();
            while(it.hasNext()){
                FileItem fileItem = (FileItem)it.next();
                if (!fileItem.isFormField()) {
                    fileName = fileItem.getName();
                    fileData = fileItem.get();
                    // Get the imageType from the filename extension
                    if (fileName != null) {
                        int dotPos = fileName.indexOf('.');
                        if (dotPos >= 0 && dotPos != fileName.length()-1) {
                            imageType = fileName.substring(dotPos+1).toLowerCase();
                            if (imageType.equals("jpg")) {
                                imageType = "jpeg";
            String filePath = request.getParameter("FILE_PATH");
            session.setAttribute("filePath", filePath);
            session.setAttribute("fileData", fileData);
            session.setAttribute("fileName", fileName);
            session.setAttribute("imageType", imageType);
            return result;  
         } And now finally the method to actually write the file to the database:
    private int writeImageFile(byte[] fileData, String fileName, String imageType, String mode, Integer signatureIDIn, HttpServletRequest request) throws Exception {
            //If the previous code found a file that can be uploaded then
            //save it into the database via a pstmt
            String sql = "";
            UtilDBquery udbq = getUser(request).connectToDatabase();
            Connection con = null;
            int signatureID = 0;
            PreparedStatement pstmt = null;
            try {
                udbq.setUsePreparedStatements(true);
                con = udbq.getPooledConnection();
                con.setAutoCommit(false);
                if((!mode.equals("U")) || (mode.equals("U") && signatureIDIn == 0)) {
                    sql = "SELECT SEQ_SIGNATURE_ID.nextval FROM DUAL";
                    pstmt = con.prepareStatement(sql);
                    ResultSet rs = pstmt.executeQuery();
                    while(rs.next()) {
                       signatureID = rs.getInt(1);
                    if (fileName != null && imageType != null) {
                        sql = "INSERT INTO T_SIGNATURE (SIGNATURE_ID, SIGNATURE) values (?,?)";
                        InputStream is2 = new ByteArrayInputStream(fileData);
                        pstmt = con.prepareStatement(sql);
                        pstmt.setInt(1, signatureID);
                        pstmt.setBinaryStream(2, is2, (int)(fileData.length));
                        pstmt.executeUpdate();
                        pstmt.close();
                        con.commit();
                        con = null;
                if(mode.equals("U") && signatureIDIn != 0) {
                    signatureID = signatureIDIn.intValue();
                    if (fileName != null && imageType != null) {
                        sql = "UPDATE T_SIGNATURE SET SIGNATURE = ? WHERE SIGNATURE_ID = ?";
                        InputStream is2 = new ByteArrayInputStream(fileData);
                        pstmt = con.prepareStatement(sql);
                        pstmt.setBinaryStream(1, is2, (int)(fileData.length));
                        pstmt.setInt(2, signatureID);
                        pstmt.executeUpdate();
                        pstmt.close();
                        con.commit();
                        con = null;
            } catch (Exception e) {
                con = null;
                throw new Exception(e.toString());
            return signatureID;
       }

  • How to load text file data to Oracle Database table?

    By using Oracle Forms, how to load text file data to Oracle Database table?

    Metalink note 33247.1 explains how to use text_io as suggested by Robin to read the file into a Multi-Row block. However, that article was written for forms 4.5 and uses CREATE_RECORD in a loop. There was another article, 91513.1 describing the more elegant method of 'querying' the file into the block by transactional triggers. Unfortunately this more recent article has disappeared without trace and Oracle deny its existence. I know it existed as I have a printed copy in front of me, and very useful it is too.

  • Installation error message for Oracle Database software for version 10g

    Would someone be able to advise why I keep getting the following error message whilst installing Oracle trial Database software for version 10g Release 2 Standard Edition, Standard Edition One, and Enterprise Edition? Link listed below : -
    http://www.oracle.com/technology/software/products/database/oracle10g/index.html
    Error message "Cannot create directory"C:\oracle\product\10.2.0\db_7\cfgtoollogs\dbca\projemp"
    Below is the 12 steps that I go through, please advise what I'm doing wrong : -
    1. (Operations) default is Create a database
    2. (Database templetes) default is general purpose
    3. (Database Identification) projemp.local for Global database name & projemp for SID
    4. (Management options) default is "Configure the database with Enterprise manager, also the options button has been clicked for "Use database control for database management"
    5. (Database Credentials) the options button has been clicked for "Use the same password for all accounts" so I've set up a new password, was that correct?
    6. (Storage options) the options button is clicked for "File System - use the file system for database storage.
    7. (Database file locations) the options button is clicked for "Use database file locations for template" Is this option correct? Other options are Use common location for all database files or use Oracle-managed files?
    8. (Recovery configuration) the options button is clicked for "Specify flash recovery area
    9. (Database content) nothing has been selected, the only option is "Sample schemas" should that be clicked?
    10. (Initialization parameters) the options button is clicked for "Typical- allocate memory as a % of the total physical memory
    11. (Database storage) no options available
    12. (Creation options) the options button has been selected for "Create Database"
    Click finish
    I then get a screen stating General purpose, click OK then I get the following error message as stated at the start of this e-mail ""Cannot create directory"C:\oracle\product\10.2.0\db_7\cfgtoollogs\dbca\projemp".
    Regards
    Phil

    855880 wrote:
    I have been trying to install the "Oracle Database software for version 10g Release 2 Standard Edition, Standard Edition One, and Enterprise Edition" about six times with no success.Do you realize you just mentioned 3 different and distinct products? So which one are you installing?
    >
    I've gone through my courses instructions as listed above (1-12) and end up with the following error message"C:\oracle\product\10.2.0\db_7\cfgtoollogs\dbca\projemp".What course?
    >
    I've removed the software from my computer using control panel, programs & features then uninstall once but the other five times the software hasn't been listed. Whilst the Oracle was on my task bar I was able to install using Start > Programs > Oracle - HOME-NAME > Database Administration > Database Configuration Assistant.No you didn't. Database Configuration Assistant does not remove software. It can remove a database. As I mentioned before, there is a difference between the software and the objects that software manages. Deleting an Excel spreadsheet is not the same as deleting Microsoft Office. Deleting an Oracle database with Database configuration assistant is not the same as removing the Oracle software.
    >
    Now that oracle is not on my task bar I've unzipped the link below, clicked on db, Disk1, setup, changed the Database password (is that correct?) install and I get the following error message "Check complete. The overall result of this check is: Failed<<<<<
    Problem: The install has detected that the primary IP address of the system is DHCP-assigned.
    Recommendation: Oracle supports installations on systems with DHCP-assigned IP addresses;
    However, before you can do this, you must configure the Microsoft LoopBack Adaptor to be the primary network adapter on the system. See the installation Guide for more details on installing the software on systems configured with DHCP."
    So what did you do with the above error message? Did you follow up on what it said? Did you read the very fine Installation Guide that comes with the software? Did you read the section on networking considerations where it discussed DHCP assigned addresses and installing the loopback adapter?
    http://www.oracle.com/technology/software/products/database/oracle10g/index.html
    Ok, that link takes us to the download page, which does not shed any light at all on your problems
    I'm using Windows Vista Home Premium, 32 bit operating system, and my computer is saying I have 142 GB free space.
    If you read the installation manual that came with the downloaded software, you'd have seen in the prerequisites that Home editions of Windows are NOT listed as supported platforms, whereas Business, Enterprise, and Ultimate editions specifically ARE listed as supportd.
    Hope this is some help.And
    I'm not to clever on computers so would you be able to advise how I get to the command window to issue the SET command please?
    Also I've no idea what OS user I am, I'm taking an on-line Oracle course and been advised to install "Oracle Database software for version 10g Release 2 Standard Edition, Standard Edition One, and Enterprise Edition"
    How do I find out if I'm part of an Administrator, ORA_DBA group ?
    Can you walk me through how to create the directory from command line please?Ok, given the above statements from you, I'm not even sure where to begin. I don't want to be cruel, but this self-admitted lack of even the most rudimentary knowledge by someone attempting to learn about Oracle is truly astounding. What course are you taking? Why are you taking this course?

  • How to add the error message into Delivery Error Log (VL10A,VL10X)

    Hi,
    I have a to add my custom message into Delivery creation error log (VBFS, VBSS)
    This message should be shown in the Collective process log (VL10X, VL10A).
    Please give me the soln to solve this problem.
    I have searched in SDN, i didnt get the proper solution
    Thanks
    Shankar

    HI,
    Make use of the BADi "LE_SHP_DELIVERY_PROC"
    Use the method DELIVERY_FINAL_CHECK.
    Pass the error messages in table CT_FINCHDEL.
    Regards,
    Ankur Parab

  • How to store an excel sheet in oracle database

    How can I store excel sheet into oracle.

    Or you could use Heterogenous Services to treat Excel as an external database:
    1- Go to Control Panel>Administrative Tools>Data Sources (ODBC)>System DSN and create a data source with appropriate driver. Name it EXCL.
    2- In %ORACLE_HOME%\Network\Admin\Tnsnames.ora fie add entry:
    EXCL =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 10.12.0.24)(PORT = 1521))
    (CONNECT_DATA =
    (SID = EXCL)
    (HS = OK)
    Here SID is the name of data source that you have just created.
    3- In %ORACLE_HOME%\Network\Admin\Listener.ora file add:
    (SID_DESC =
    (PROGRAM = hsodbc)
    (SID_NAME = <hs_sid>)
    (ORACLE_HOME = <oracle home>)
    under SID_LIST_LISTENER like:
    SID_LIST_LISTENER =
    (SID_LIST =
    (SID_DESC =
    (SID_NAME = PLSExtProc)
    (ORACLE_HOME = d:\ORA9DB)
    (PROGRAM = extproc)
    (SID_DESC =
    (GLOBAL_DBNAME = ORA9DB)
    (ORACLE_HOME = d:\ORA9DB)
    (SID_NAME = ORA9DB)
    (SID_DESC =
    (PROGRAM = hsodbc)
    (SID_NAME = EXCL)
    (ORACLE_HOME = D:\ora9db)
    Dont forget to reload the listener
    c:\> lsnrctl reload
    4- In %ORACLE_HOME%\hs\admin create init<HS_SID>.ora. For our sid EXCL we create file initexcl.ora.
    In this file set following two parameters:
    HS_FDS_CONNECT_INFO = excl
    HS_FDS_TRACE_LEVEL = 0
    5- Now connect to Oracle database and create database link with following command:
    SQL> CREATE DATABASE LINK excl
    2 USING 'excl'
    3 /
    Database link created.
    Now you can perform query against this database like you would for any remote database.
    SQL> SELECT table_name FROM all_tables@excl;
    TABLE_NAME
    DEPT
    EMP

  • How to store India Regional language in oracle database

    Hi,
    Can any guide us how can we store data in Indian regional languages in Oracle database.
    We are using Oracle 10g.
    Also i need to know can we convert existing data in oracle to local language ?
    Thanks

    B_M_A wrote:
    Hi,
    Can any guide us how can we store data in Indian regional languages in Oracle database.
    We are using Oracle 10g.
    Also i need to know can we convert existing data in oracle to local language ?Unicode should help, please see,
    http://docs.oracle.com/cd/E11882_01/server.112/e10729/ch6unicode.htm#i1006691
    Aman....

  • How to store and retrive images in oracle database

    hi,
    i am interested in storing some students pictures ( photos) into my oracle database, and i want to know since the images are considered as binary data and since BLOB and CBLOB and supported by oracle, how to insert and to select the picture from oracle from my swing-based application?
    does anyone have a complete sample or tutorial doing that well!!
    thx

    Mira este link,
    hay varios articulos interesantes.
    http://www.oracle-base.com/articles/9i/Articles9i.php
    tambien puedes consultar este link
    http://tahiti.oracle.com/pls/db92/db92.homepage
    completa los coampos solicitados con la palabra "Images"
    hay un manual de LOBs muy completo

  • How to Store PDF files In the Oracle Database?

    Hi All,
    It is required for me to store the PDF files in the Database and retrieve it back whenever necessary.
    Also I need to store it with some security. So no one can read the content of the file.
    Please give me solution to these problems.
    Thanks

    vasav wrote:
    Hi All,
    It is required for me to store the PDF files in the Database and retrieve it back whenever necessary.Why not save the files to disk and store a link to the file in the database instead?
    Also I need to store it with some security. So no one can read the content of the file.Authenticate users requesting files.
    Please give me solution to these problems.There are many possible solutions for your requirements.

  • Import/insert data from XML into Oracle database tables?

    Hi. (I am using JDeveloper 10.1.3.3.0 and Oracle 10g)
    I have been able to export the data from one of my database tables by using a View Object and .writeXML.
    Now, I want to take an xml file that is formatted in the same way as what is spit out by the writeXML and put that info in my database table. I followed online examples and have tried using .readXML like so:
    Element element = XMLDoc.getDocumentElement();
    vo.readXML(element, -1);
    I know it is sort of working, because at first I got an error message that one of the required attributes was missing. So, I added that attribute to my xml file and ran my code. No errors. But, I checked my database, and the new records were not added.
    Is there something I have done wrong? Or is there perhaps something I left out? I also noticed there were several versions of readXML like readFromXML. Which one should I use and how?
    Thanks.

    KUBA, I changed my code to match your example:
    DocumentBuilder db = DocumentBuilderFactory.newInstance().newDocumentBuilder();
    File xmlFile = new File("C:/myfilehere.xml");
    Document doc = db.parse(xmlFile);
    Element element = doc.getDocumentElement();
    vo.readXML(element, -1);
    vo.getDBTransaction().commit();
    I still get no errors, but my database table has no new records.
    Any ideas why?
    Thanks.

  • How I store my sound file in my database table

    Dear friend
    i make a table for store sound file
    table is create .
    but now
    how i insert that file which is at 'c:\my document '
    to this table.
    i try following command but it has a error
    insert into sound values('c:\my document\abc.au');
    what i do for it
    please mail me as soon as on following id
    [email protected]
    ok bye

    Dear friend
    i make a table for store sound file
    table is create .
    but now
    how i insert that file which is at 'c:\my document '
    to this table.
    i try following command but it has a error
    insert into sound values('c:\my document\abc.au');
    what i do for it
    please mail me as soon as on following id
    [email protected]
    ok bye

  • Import Excel File Data into oracle database table.

    HI,
    i want to insert data into a specific table from a excel file. please help me..
    for example
    emp.xls file's data need to be import in emp database table.
    thanks in advance...

    Hi,
    to all knowledgable person, this would be gald for u all that i have solved the problem.
    through this procedure..
    PROCEDURE IMPORT_FROM_EXCEL_PROC (as_FileName VARCHAR2, exe_name varchar2) IS
              appid PLS_INTEGER;
              convid PLS_INTEGER;
              docid PLS_INTEGER;
              conv_established BOOLEAN := FALSE;
              buffer VARCHAR2(100);      
              Emp_code VARCHAR2(100);
              Emp_name VARCHAR2(100);
              Emp_desig VARCHAR2(100);
              Emp_Salary VARCHAR2(100);
              ls_error VARCHAR2(1000);
              li_row integer;
              li_col integer;
              li_error_count integer;
              li_load_count integer;
    BEGIN
         --Start Excel
         --This line assumes that Excel is in the specified directory
              --     APPID := DDE.APP_BEGIN('D:\OFFICE11\EXCEL.EXE',DDE.APP_MODE_MINIMIZED);
              APPID := DDE.APP_BEGIN(exe_name,DDE.APP_MODE_MINIMIZED);
         --Establish a conversation with Excel
         --The following loop will not end until a conversation with Excel
         --has been established. Therefore, it can result in a endless loop,
         --so use with caution.
              WHILE NOT conv_established LOOP
              BEGIN
              convid := DDE.INITIATE('excel', 'system');
              conv_established := TRUE;
              EXCEPTION
              WHEN DDE.DMLERR_NO_CONV_ESTABLISHED THEN
              conv_established := FALSE;
              END;
              END LOOP;
         --Open Excel document
         --This assumes that you have an Excel spreadsheet named ddetest.xls in the root of c:
              DDE.EXECUTE(convid, '[Open("'||as_FileName||'")]', 10000);     
         --Initiate conversation with Excel document
              docid := DDE.INITIATE('excel',as_FileName);
         --Begin transfer from Excel to Forms
                   li_load_count := 0;
                   li_error_count := 0;
                   li_col := 1;
                   li_row := 2;
                   GO_BLOCK('IMPORT_XLS');          
                   DDE.REQUEST (docid, 'R' || TO_CHAR(li_row) || 'C' || TO_CHAR(li_col), buffer, DDE.CF_TEXT, 1000);          
                   WHILE length(buffer) > 2 LOOP           
                   WHILE li_col < 5 LOOP
                        buffer := substr(buffer, 1, instr(buffer, chr(10)) - 2);               
                   IF li_col = 1 THEN --Emp_code
                        Emp_code := buffer;     
                   ELSIF li_col = 2 THEN --Emp_name     
                        Emp_name := buffer;     
                   ELSIF li_col = 3 THEN --Emp_desig      
                        Emp_desig := buffer;     
                   ELSE --Emp_salary
                        Emp_salary := buffer;
                   END IF;
                   IF nvl(ls_error,'N') = 'N' THEN
                   li_col := li_col + 1;
                   DDE.REQUEST (docid, 'R' || TO_CHAR(li_row) || 'C' || TO_CHAR(li_col), buffer, DDE.CF_TEXT, 1000);
                   ELSE
                   li_col := 5;
                   END IF;               
                   END LOOP;
                   IF nvl(ls_error, 'N') = 'N' THEN
                   li_load_count := li_load_count + 1;
                   IF li_load_count = 1 THEN
                   FIRST_RECORD;
                   ELSE
                   NEXT_RECORD;
                   END IF;
                   :IMPORT_XLS.Emp_code := Emp_code;               
                   :IMPORT_XLS.Emp_name := Emp_name;          
                   :IMPORT_XLS.Emp_desig := Emp_desig;
                   :IMPORT_XLS.Emp_salary := Emp_salary;
                   ELSE
                   li_error_count := li_error_count + 1;
                   DDE.POKE(docid, 'R' || TO_CHAR(li_row) || 'C5', ls_error, DDE.CF_TEXT, 10000);
                   END IF;
                   ls_error := '';
                   Emp_code := '';
                   Emp_name := '';
                   Emp_desig := '';
                   Emp_salary := '';
                   li_col := 1;
                   li_row := li_row + 1;
                   DDE.REQUEST (docid, 'R' || TO_CHAR(li_row) || 'C' || TO_CHAR(li_col), buffer, DDE.CF_TEXT, 1000);                
                   END LOOP;               
                   IF li_error_count > 0 THEN
                        DDE.EXECUTE(convid, '[[save]]', 10000);
                        Message(TO_CHAR(li_load_count) || ' Record(s) Loaded. ' ||
                        TO_CHAR(li_error_count) || ' Invalid Record(s). See error in excel file.');
                        ELSE
                        Message(TO_CHAR(li_load_count) || ' Record(s) Successfully Loaded.');
                   END IF;                
                   --End transfer to Excel
                   DDE.TERMINATE(docid);
                   DDE.TERMINATE(convid);
                   DDE.APP_END(appid);                          
                   --Handle exceptions
                   EXCEPTION
                   WHEN DDE.DDE_APP_FAILURE THEN
                   MESSAGE('WINDOWS APPLICATION CANNOT START.');
                   WHEN DDE.DDE_PARAM_ERR THEN
                   MESSAGE('A NULL VALUE WAS PASSED TO DDE');
                   WHEN DDE.DMLERR_NO_CONV_ESTABLISHED THEN
                   MESSAGE('DDE CANNOT ESTABLISH A CONVERSATION');
                   WHEN DDE.DMLERR_NOTPROCESSED THEN
                   MESSAGE('A TRANSACTION FAILED');
    END;

  • Help on interface to store CAD/CAM drawings into oracle database using form

    i am using forms 6i and oracle 8i. i am able to store .jpg and other picture files into data base.now my problem is how show and store the CAD/CAM drawings using forms. can any one help me please. is higher version is providing any new facility for this purpose?
    thank you

    thanks for your help.
    i am using client/server based application and cad/cam software was also installed on it. helper application means, the cad/cam software should provide some controls to view the drawings in other applications? am i correct.

  • How to store my mp3 files into my database

    Hello,
    I am having some trouble with a database i am creating to store my mp3 files. I have created the following sql statement so far using what research i did on the subject.
    CREATE TABLE music
    ( Artist CHAR(30),
    NameOfSong CHAR(30),
    Song BLOB);
    But i have no idea how to do a INSERT statement for the BLOB datatype. I am trying to use a location on my hard drive to upload the song to the table. All help is welcomed.
    Thank you,

    http://forums.oracle.com/forums/search.jspa?threadID=&q=insert+blob&objID=f75&dateRange=all&userID=&numResults=15
    Message was edited by:
    jeneesh

Maybe you are looking for