How to output database record in .doc format?

Good day to all of you! I want to output the database records to a formatted .doc document.For example,
Here are the db records:
firstname mid lastname age
ryan g gomez 23
shiela m vanilla 21
and the created document will be a .doc file, which will be formatted with image etc...
+"File for the first record let's say RyanGomez.doc"+
h4. Company Logo || Company Name
h4. -------------------------------------------------------------------------------------------------------
First Name: Ryan Middle Intial:G Last Name:Gomez
+"and a separate file for the second format.. and so on...til all the records are created"+
h4. Company Logo || Company Name
h4. -------------------------------------------------------------------------------------------------------
First Name:Shiela Middle Intial:A Lastname:Vanilla
I know that I need Bufferedwriter/reader or printwriter but I'm having a problem on how to format or edit the output ...any help regarding this?
I have tried using iText but I think it can only output pdf file...I need a doc output file.

try {
        // Create a statement
        Statement stmt = connection.createStatement();
        // Prepare a statement to insert a record
        String sql = "DELETE FROM my_table WHERE col_string='a string'";
        // Execute the delete statement
        int deleteCount = stmt.executeUpdate(sql);
        // deleteCount contains the number of deleted rows
        // Use a prepared statement to delete
        // Prepare a statement to delete a record
        sql = "DELETE FROM my_table WHERE col_string=?";
        PreparedStatement pstmt = connection.prepareStatement(sql);
        // Set the value
        pstmt.setString(1, "a string");
        deleteCount = pstmt.executeUpdate();
        System.err.println(e.getMessage());

Similar Messages

  • How to convert the output of smartforms into doc format

    Hi friends,
    I want the output of smartform to be saved in doc format. I don't want to view the printpreview screen and then save it. The way we save the output in pdf format I want it to be done in doc format. Please don't suggest this option
    After the print preview, Select the menu Goto->List Display.
    Now select the menu System->List->Save->Local File.
    Now you can select the radio buttion Rich Text Format.
    Now you save the document as a .doc file (say test.doc)
    Regards,
    Satabdi

    Hi friends,
    I want the output of smartform to be saved in doc format. I don't want to view the printpreview screen and then save it. The way we save the output in pdf format I want it to be done in doc format. Please don't suggest this option
    After the print preview, Select the menu Goto->List Display.
    Now select the menu System->List->Save->Local File.
    Now you can select the radio buttion Rich Text Format.
    Now you save the document as a .doc file (say test.doc)
    Regards,
    Satabdi

  • Are the how-to's in pdf or doc format?

    Hi.
    Do you have a copy of the how-to's in pdf or in doc format I can download so I can study while off-line?
    Thanks.
    Emad

    Emad,
    All How-Tos are in HMTL. You can still print them out from a browser.
    Thanks,
    - Scott -

  • How to identify database records without using rowid.

    Hello,
    I want to find a way to identify records uniquely in my database without the use of the rowid.
    What I want to do is the following :
    I have a table that contains images. Something like that :
    Table images (id number, image blob).
    Lets say that in this table I have scanned images of persons, invoices and orders.
    I want to be able to associate a record with different records from different tables from my ERP via an association table.
    this table could be :
    Table image_associations (imageid number, rowid_column varchar2(100))
    The "rowid_column" would contain the rowid of the row that is associated with the image.
    The problem is that the rowid is something that changes (for example after export/import).
    So I do not want to use rowid.
    Any ideas?
    Thanks

    What you are saying is you want to avoid theaccepted relational design theory and subvert the
    fundamental principles of very model?
    Yes !!!!Then you are very short sighted and will fail. Why would you want to do this? How is it that you think you are smarter than the forefathers of our industry? an idea so compelling that huge companies have many massive profits implementing the concepts? (sometimes even properly) and how is it that you imagine you can work outside the concepts underlying those tools, within the tool and come to a better solution? this is arrogance surely.
    >
    I think a lot of people use rowid to identify within
    plsql code a record instead of using the table-key.
    There is very limited specific application of the ROWID for temporary reference within known bounds.
    You shouldn't rely on the ROWID. Think about what it actually is: a physical location address hash.
    Don't use it. Just don't.
    As I can remember from my classrooms (a lot of years
    ago) rowid was never mentioned in ER models. Still
    that helps a lot..For very good reason. Rowid is an implementation concept, and not a logical concept.
    Oracle already makes provision at the physical storage level to store BLOBs out of line with a record. You don't need to try to do this at the logical level as I said already.

  • How to sort database record in an Ascending or Descending order

    First script below is on Initialize the second on Validate.  I need the database to sort on an ascending order.  I tried using the order by script in RED below to the Validate script but to no avail.  Any help would be greatly appreciated.
    $sourceSet.DataConnection2.#command.query.select.nodes.item(0).value = Concat("Select * from brw.ps_m_ee_genl_data Where FULL_NAME = ", Ltrim(Rtrim(SelectField.rawValue)) , " order by FULL_Name asc")
    form1.#subform[0].SelectField::initialize - (JavaScript, client)
    /* This listbox object will populate two columns with data from a data connection.
    sDataConnectionName - name of the data connection to get the data from. Note the data connection will appear in the Data View.
    sColHiddenValue - this is the hidden value column of the listbox. Specify the table column name used for populating.
    sColDisplayText - this is the display text column of the listbox. Specify the table column name used for populating.
    These variables must be assigned for this script to run correctly. Replace <value> with the correct value.
    var 
    sDataConnectionName = "DataConnection2"; // example - var sDataConnectionName = "MyDataConnection";
    var 
    sColHiddenValue = "FULL_NAME"; // example - var sColHiddenValue = "MyIndexValue";
    var 
    sColDisplayText = "EMPLID"; // example - var sColDisplayText = "MyDescription"
    // Search for sourceSet node which matchs the DataConnection name
    var 
    nIndex = 0;
    while 
    (xfa.sourceSet.nodes.item(nIndex).name != sDataConnectionName){
    nIndex
    ++;}
    var 
    oDB = xfa.sourceSet.nodes.item(nIndex);oDB.open();
    oDB.first();
    // Search node with the class name "command"
    nIndex
    = 0;
    while 
    (oDB.nodes.item(nIndex).className != "command"){
    nIndex
    ++;}
    // Need to set BOF and EOF to stay
    oDB.nodes.item(nIndex).query.recordSet.setAttribute("stayBOF"
    , "bofAction");oDB.nodes.item(nIndex).query.recordSet.setAttribute("stayEOF"
    , "eofAction");
    // Search for the record node with the matching Data Connection name
    nIndex
    = 0;
    while 
    (xfa.record.nodes.item(nIndex).name != sDataConnectionName){
    nIndex
    ++;}
    var 
    oRecord = xfa.record.nodes.item(nIndex);
    // Find the value node
    var 
    oValueNode = null;
    var 
    oTextNode = null;
    for 
    (var nColIndex = 0; nColIndex < oRecord.nodes.length; nColIndex++){
    if(oRecord.nodes.item(nColIndex).name == sColHiddenValue){
    oValueNode
    = oRecord.nodes.item(nColIndex);}
    else if(oRecord.nodes.item(nColIndex).name == sColDisplayText){
    oTextNode
    = oRecord.nodes.item(nColIndex);}
    while 
    (!oDB.isEOF()){
    this.addItem(oValueNode.value
    , oValueNode.value); 
    //IDList.addItem(oValueNode.value, oTextNode.value);
    oDB.next();
    // Close connection
    oDB.close();
    form1.#subform[0].SelectField::validate - (FormCalc, client)
     if  (Len(Ltrim(Rtrim(SelectField.rawValue))) > 0) then
     //Change the commandType from TABLE to TEXT. TEXT is the equivalent of SQL Property
    $sourceSet.DataConnection2.#command.query.commandType= "text" 
    //Set the Select Node. Select in this case will be whatever the SQL Property you want.
    $sourceSet.DataConnection2.#command.query.select.nodes.item(0).value= Concat("Select * from brw.ps_m_ee_genl_data Where FULL_NAME = ", Ltrim(Rtrim(SelectField.rawValue)) , "") 
    //Reopen the Dataconnection
    $sourceSet.DataConnection2.open()endif

    This is in Mavericks, but I think it also applies to the Finder in Lion.
    View menu / Arrange by / Name.

  • How to insert a record with date format field

    I tried to execute the query of the below but it showed error and hence i did research and found out i can add a date syntax in front to format it properly.
    INSERT INTO EMP (EmpNo, EmpName, Sex, DateOfBirth, Salary, DeptNo)
    VALUES ('E001', 'Alex', 'M', '2006-11-08', '1500', 'D001');
    When i executed the following query under SQL plus environment, it hang and gave no response. May i know how to solve this problem? Thank you
    INSERT INTO EMP (EmpNo, EmpName, Sex, DateOfBirth, Salary, DeptNo)
    VALUES ('E001', 'Alex', 'M', DATE '2006-11-08', '1500', 'D001');

    Normally when we execute a query, it will show the result or response whether it is fail or success or what the error message is. But my situation is that it showed nothing and no response, and cannot execute new query, i cant do anything under that environment and i can only off it by using end task.

  • How to display database records in text item

    hello friends,
    I'm using forms6i..
    I have text item named "username" in layout editor.I created this text item from data block wizard..I set Number of items displayed=3 in that wizard..
    In property palette of of "username" i have following changes
    Number of items displayed =3;
    When i click the button named "list_user" it should shows all user names in text item..
    my when-button-pressed trigger code is:
    declare
    cursor c1 is
    select Logid from log1 where logout_date is null;
    begin
    open c1;
    fetch c1 into :username;
    end;
    But my problem is when i run the form only one user displayed in text item..Remaining two text items are having no data..
    The result of the cursor query is :
    SQL> ed
    Wrote file afiedt.buf
    1 select logid from log1 where logout_date is null
    SQL> /
    LOGID
    104
    105
    106
    pls help me
    Edited by: Balraj on Feb 23, 2011 1:45 AM

    I have text item named "username" in layout editor.I created this text item from data block wizard..I set Number of items displayed=3 in that wizard..
    In property palette of of "username" i have following changes
    Number of items displayed =3;Its great that it is working fine, but seems your block is database block based on the same table log1, then why do you want to loop when form has better way.
    Secondly if you have set No of Records for a block then there is no need to set the No of Items displayed for the Item if it is the same as Records displayed for block.
    You can use No of Items displayed for an Item if you need to display no different then no of records else no need to change the default that is 0
    No of items displayed is usually used to display Summary Columns in a multi record block so that you will be able to display just 1 Item rather then as many as the No of records.
    Best Regards
    Arif Khadas

  • How to delete a database record by using EJB entity beans

    Hi, All,
    Does anyone know how to use entity bean to delete a database record? I have all the EJB entity beans created, including access beans to each. I can successfully create records, find and update records, however, I haven't find a way to delete records yet.
    Your response is appreciated.
    Cathy

    Please see EJB Forums for continue discussion on this subject.
    Reference titile: "how to delete database record by using CMP entity beans "

  • Implementing database records through Trees

    I am having a problem regarding trees.. Can anyone send me the code ,how to implement records from the Database through trees.. i m using JDBC. Please let me know soon .. and send me the syntax aswell..
    Bye.. Thankssss

    Since I am using CMP Entity Beans, I would like to use CMP/BMP facilities to delete
    the Entity EJB instances (perhaps database rows) instead of taking a different
    approach just for deletion.
    Thanks anyway for your response.
    William Kemp <[email protected]> wrote:
    Perhaps a stateless session bean that does some jdbc to remove the records?
    You could
    call it from anywhere, servlet, client side, entity bean....
    With some sql something like:
    "delete from table where column = criteria"
    Bill
    Satya wrote:
    I am using CMP for the entity beans in our project and I have a questionregarding
    remove.
    How to remove database records?
    I know one solution which is to find the records by EJB finder methodand call
    remove() in each entity bean instace.
    Is there any other way to remove the records, for example I want toremove a bunch
    of records based on a criteria in one shot.
    Thanks in advance for your suggestion.

  • Generating reports in .doc format (Word Document) using Java POI - HWPF

    Hi
    Can anybody help me how to generate the report in .doc format using POI API?
    Please share the sample code, if you have.
    Thanks in Advance
    Dhilip

    Hi,
    I dont think that your requirement has to do with ADF capabilities.
    You want to edit a word document with JAVA. For that reason, you will need an API, as the suggestions above.
    You can do it without ADF and by using standard JAVA and the API of your choice. a static void main will do for that matter.
    ADF comes into the game when you want to handle the document with your ADF application.
    This means that you either want to get your new data to be placed on your doc from BC or any other DataControl or you want to do something else with ADF..
    My guess is that you want to get data from ADF into your Doc.
    You could create an API on handling your Doc and then use it into your ADF application.
    Regards,
    Dimitris.

  • How to know if an output condition record is ever used in sales docs

    All,
    I can see some output condition records in table B001. Additional detail of these records is in table NACH. But is there a way to know whether these condition records are determined in any sales docs?
    In individual sales documents, I can manually check what condition records are determined from the 'output determination analysis' screen. Here I can see the number of the condition record that the system has determined. But is there a table which links sales document and output condition record? (equivalent of KONV)
    Thanks & Regards,
    KC
    PS: Table NAST stores transaction data but only the output type and sales doc number is shown but it doesn't show the condition record (though it can be checked manually).

    Hi Krishna,
    Depending on the version of SAP you are using there is a transaction i think it is VA70 in ECC6 or in 4.6 there is a standard program for mass printing from a sales order.
    You can use this tcode/program the very same as VL71 for deliverys and enter in your output type and change the processing mode to 2 and execute from here you can see if it was ever printed
    Regards
    Paul

  • How to download a page in pdf or doc format

    Hi,
    I want to download a content of page in pdf or doc format through a button.
    How can I acheive it.
    I created a salary page and now want to download this page directly in pdf or doc format, how to do it.
    Using Peopltools 8.49
    PS HRMS 9.0
    plz help.
    Many thanks...

    The entire solution would be too large and complex to post. Here are some pointers to get you going. One alternative is to use BI/XML Publisher to create the output document and launch it from a button on the page (PeopleCode and Derived/Work record). Another alternative is to use Apache POI to generate a doc and iText to generate PDF. Customers have used all of these approaches.

  • How to Output Rich Text Format.

    Hi everyone, i use a rich text editor called tiny mce in my web application. After i click the submit button the value inside the text area would be saved in my database including the HTML tags e.g. <i>Sample Report edited via Tiny MCE Rich Text Editor<i>. I need to output the text in a webuijsf static text component but the moment i see the output the tags are still there and the text is not in italics format. Does anyone know how to output it in static text with the design in it?

    It is not updated for more than 1 years and it is dropped by Sun and users were recommended to migrate to ICEfaces.
    [http://woodstock.dev.java.net]
    The Woodstock release 4.2 is the last official version of Woodstock that Sun will release. Sun will continue to support its customers that have built on top of Woodstock 4.2. The Project Woodstock code is still available, and community members can still create new features or enhancements. For future development or migration of existing Woodstock projects, Sun is officially endorsing ICEfaces as the replacement technology for Woodstock. Also see [http://www.nabble.com/Woodstock-Migration-Path-to-ICEfaces-td21057513.html], although I would recommend RichFaces above that. It is only that it doesn't have a drag'n'drop palette for Netbeans, so it is not reachable for blind visual developers.

  • I am on windows 8 platform, i used adobe elements to work on my image - the output is in dng format, how do i convert this to jpg format?

    i am on windows 8 platform, i used adobe elements to work on my image - the output is in dng format, how do i convert this to jpg format?

    When you make a DNG that's like making another raw file, so you will need to convert the DNG file just like your original raw. Don't use the Save button in the raw converter. That's just a link to the DNG converter. Normally you would click Open instead and then save in the editor as a jpg or other image format of your choice.

  • How to post a table/set of records without losing formatting while posting

    how to post a table/set of records without losing formatting while posting in this message forum. Thanks

    Most forums have a FAQ. This one is no exception.
    It is in the right hand upper corner. It's URL is http://wikis.sun.com/display/Forums/Forums+FAQ
    Sybrand Bakker
    Senior Oracle DBA

Maybe you are looking for

  • How to downgrade from Internet explorer 11 to internet explorer 10 on windows server 2008 R2

    Hi, Can someone please let me know how I can downgrade from IE11 to IE10 in my windows server 2008 R2. When I go to control Panel -> Programs -> features and I don't see any program name with internet explorer in that list. Also, when I go to on 'Vie

  • Sort the values in Bex query variable screen

    Dear Experts, Is it possible to sort the values of a dropdown list for variables on BEX variable selection screen ?  For example, For calender month selection, the values are by default sorted by ascending order. Is it possible to sort by descending

  • DIY: Is it possible to replace the Hard Drive on a MacBook?!

    It seems it is permitted to replace the Hard Drive on a MacBook (13"). I found Apple "Hard Drive Replacement Instructions 073-1045 Rev A" dated 26 Jan 2007. OK this is very basic-- but my question is: When you get the Hard Drive and Install it-- can

  • Root partition filling up over time

    I am running Sol 10 11/06 on a Sun Blade. I installed Sol 10 from DVD a few months ago, making my / partition 12GB in size. /var is not a separate partition. Sun Studio 11 was also installed. I have installed all available patches using Sun Update Ma

  • Window drawing Woes!

    I just had a major crash while using Zend Studio on OSX, which I think it is a Java application. Now, I have this heavy black bordered box drawn around every window element I focus the mouse or keyboard on in every application window, even after rebo