How can i write the DOM tree to the XML File?

Asslamo ala mn etb3a Alhoda.
My problem priefly is that i can't write the DOM tree to XML file.
I write following code to give the user the ability to input the name of data base which he want to create.
If i wrote DB name,its atrributes and its values succefully to XML file ,then i'll read it succefully to RAM.
It'll be simple DBMS.
***My code***
import javax.swing.*;
import javax.xml.parsers.*;
import org.w3c.dom.Document;
import org.w3c.dom.DOMException;
import org.w3c.dom.Element;
public class Main {
     * @param args
public static void main(String[] args) {
     // TODO Auto-generated method stub     
     String DBname;
DBname=JOptionPane.showInputDialog("Enter Your Data Base Name");
OPerations O=new OPerations();
     O.creatDB(DBname);
class OPerations {
public void creatDB(String name){
     //get an empty Document
     DocumentBuilderFactory f; f=DocumentBuilderFactory.newInstance();
     try {
          builder = f.newDocumentBuilder();
          Document doc= builder.newDocument();
     //Build tree DOM With the root Node
          Element root=doc.createElement(name);
     //add the root element to thevdocument
          doc.appendChild(root);
catch (ParserConfigurationException e) {
     // TODO Auto-generated catch block
          e.printStackTrace();
}

Do an identity transformation to output it:TransformerFactory tf = TransformerFactory.newInstance();
Transformer tr = tf.newTransformer();
tr.transform(new DOMSource(doc), new StreamResult(new FileOutputStream(new File(filename))));(typed without syntax check)

Similar Messages

  • How can I delete only one part of my xml file?

    Hello,
    I stored more than 100 users in only one xmltype column. For instance
    Create table agro(users XMLTYPE);
    ... and I inserted all users inside
    INSERT INTO agro values(XMLTYPE
    ('<?xml version="1.0" encoding="ISO-8859-1"?>
    <authentication><users><user>
    <name>cocoon</name>
    <password>cocoon</password>
    <role>admin</role>
    <title>Mr.</title>
    <firstname>Walter</firstname>
    <lastname>Cocoon</lastname>
    <company />
    <street />
    <zipcode />
    <city />
    <country>DE</country>
    <phone />
    <fax />
    <email />
    <bankid />
    <bankname />
    <accountid />
    </user>
    ... another user, etc.
    </users></authentication>'));
    Now I tried to delete only one part of this file. For example all persons with the name"cocoon".
    I used for this target the following statement:
    DELETE FROM agro agro
    WHERE agro.users.extract('authentication/users/user/text()').getStringVal()= 'cocoon';
    When I execute this statement, Oracle DB delete all users and not only with the name "Cocoon".
    How can I delete only one part of my xml file?
    Kind Regards
    M R

    This the expected behavoir. You uploaded a document containing multiple users and then asked XML DB to delete any documnet that contained a user with the name in question. The problem here is that you are creating a mega document that contains an aggregation of user documents but then trying to work with individual user documents. This is a bad idea.
    In general XML does not understand the concept of a collection of documents. It can only operate on one document at a time. Hence the tendancy to aggregate individual documents into a single larger document. Once you have an XML database, you can perform operations on collections of document, as easily as you can perform operations on individual documents, so the need to aggregate the individual documents together disappears.
    If you store each user document as a seperate document then your delete will work as expected.

  • How can I Write a sine wave in an Access-fil​e?

    I measure a sine wave in LabView 6i. How can I write the datas automatically to an Acces-file, at the same time?
    In my program, I managed it with Execute SQL.vi, I change a number in a SQL statement(String) -> after this I push start and then it writes the statement in the Access-file.
    The problem is, it writes only one data per measurement in the file. How can I write all datas in the Access-file and measure the wave at the same time?
    Thanks for help!
    Attachments:
    getwave.vi ‏49 KB

    On the waveform palette, you will find a "to components" vi that you can break out the array of the waveform. You can then, using a for loop write all of the values from the waveform.
    Better yet, there are examples in the database toolkit manual on pages 3-13 to 3-15 that deal with reading arrays (and even has a waveform example).
    Good luck!

  • How can I write left and right in the same line of a richtextbox?

    I want to write, in the same line, text with a right aligment and other with left aligment. How can I do it?
    thanks

    I want to write, in the same line, text with a right aligment and other with left aligment. How can I do it?
    thanks
    As
    Viorel_ says "Perhaps there are other much easier solutions. For example, create two
    RichTextBoxes with no borders (if you only need two columns of text)" but the real issue would be saving the info in the RichTextBox's (RTB's) RTF or Text to two different RTF or TextFiles. Although I suppose if it was just going to
    a TextFile then you could somehow use a delimited text file so each same line number of each RTB is appended to the same line and delimited. That way you could probably load a split array with each line from the text file splitting on the delimeter per line
    and providing RTB1 with index 0 of the split array and RTB2 with index 1 of the split array. I'm not going to try that.
    This is some leftover code from a long time ago. It has three RTB's. RTB1 is there I suppose because the thread asking for this code wanted it. RTB2 is borderless as well as RTB3. The Aqua control in the top image below is the Panel used to cover RTB2's
    scrollbar. So RTB3's scrollbar is used to scroll both controls.
    I forgot to test if I typed past the scroll position in RTB2 if both would scroll as maybe RTB3 would not since it would not have anything to scroll to I suppose.
    Maybe this code can help or maybe not. The bottom two images are the app running and displaying nothing scrolled in RTB2 and RTB3 then the scroll used in the bottom image.
    Disregard the commented out code in the code below. It was there so I left it there. I suppose you should delete it. Also I didn't set the RTB's so one was left aligned and the other right aligned. I believe the Panel becomes a control in RTB2's controls
    when it is moved to cover RTB2's vertical scrollbar but don't remember although that seems the case since both RTB2 and RTB3 are brought to front so if the Panel was not one of RTB2's controls I would think it would be behind RTB2 and RTB2's vertical scrollbar
    would display but don't remember now. In fact I don't really remember how that part works. :)
    Option Strict On
    Public Class Form1
    Declare Function SendMessage Lib "user32.dll" Alias "SendMessageW" (ByVal hWnd As IntPtr, ByVal msg As Integer, ByVal wParam As Integer, ByRef lParam As Point) As Integer
    Const WM_USER As Integer = &H400
    Const EM_GETSCROLLPOS As Integer = WM_USER + 221
    Const EM_SETSCROLLPOS As Integer = WM_USER + 222
    Dim FixTheProblem As New List(Of String)
    Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
    Me.CenterToScreen()
    Panel1.BackColor = Color.White
    Panel1.BorderStyle = BorderStyle.Fixed3D
    RichTextBox2.BorderStyle = BorderStyle.None
    RichTextBox2.ScrollBars = RichTextBoxScrollBars.Vertical
    RichTextBox3.BorderStyle = BorderStyle.None
    RichTextBox3.ScrollBars = RichTextBoxScrollBars.Vertical
    RichTextBox3.Size = RichTextBox2.Size
    RichTextBox3.Top = RichTextBox2.Top
    RichTextBox3.Left = RichTextBox2.Right - 20
    Panel1.Size = New Size(RichTextBox2.Width * 2 - 16, RichTextBox2.Height + 4)
    Panel1.Left = RichTextBox2.Left - 2
    Panel1.Top = RichTextBox2.Top - 2
    RichTextBox2.BringToFront()
    RichTextBox3.BringToFront()
    FixTheProblem.Add("Curry: £6.50")
    FixTheProblem.Add("Mineral Water: £4.50")
    FixTheProblem.Add("Crisp Packet: £3.60")
    FixTheProblem.Add("Sweat Tea: £2.23")
    FixTheProblem.Add("Motor Oil: £12.50")
    FixTheProblem.Add("Coca Cola: £.75")
    FixTheProblem.Add("Petrol Liter: £3.75")
    FixTheProblem.Add("Shaved Ice: £.50")
    FixTheProblem.Add("Marlboro: £2.20")
    FixTheProblem.Add("Newspaper: £.25")
    FixTheProblem.Add("Spice Pack: £.75")
    FixTheProblem.Add("Salt: £.50")
    FixTheProblem.Add("Pepper: £.30")
    For Each Item In FixTheProblem
    RichTextBox1.AppendText(Item & vbCrLf)
    Next
    RichTextBox1.SelectionStart = 0
    RichTextBox1.ScrollToCaret()
    Dim Fix As String = ""
    For Each Item In FixTheProblem
    Fix += Item.Replace(":", "^:") & vbCrLf
    Next
    Fix = Fix.Replace(vbCrLf, "^>")
    Dim FixSplit() As String = Fix.Split("^"c)
    For i = 0 To FixSplit.Count - 1
    If CBool(i Mod 2 = 0) = True Then
    RichTextBox2.AppendText(FixSplit(i).Replace(">"c, "") & vbCrLf)
    ElseIf CBool(i Mod 2 = 0) = False Then
    RichTextBox3.AppendText(FixSplit(i) & vbCrLf)
    End If
    Next
    End Sub
    Dim RTB2ScrollPoint As Point
    Private Sub RichTextBox2_Vscroll(sender As Object, e As EventArgs) Handles RichTextBox2.VScroll
    Dim RTB2ScrollPoint As Point
    SendMessage(RichTextBox2.Handle, EM_GETSCROLLPOS, 0, RTB2ScrollPoint)
    SendMessage(RichTextBox3.Handle, EM_SETSCROLLPOS, 0, New Point(RTB2ScrollPoint.X, RTB2ScrollPoint.Y))
    'Me.Text = RTB2ScrollPoint.X.ToString & " .. " & RTB2ScrollPoint.Y.ToString
    End Sub
    Private Sub RichTextBox3_Vscroll(sender As Object, e As EventArgs) Handles RichTextBox3.VScroll
    Dim RTB3ScrollPoint As Point
    SendMessage(RichTextBox3.Handle, EM_GETSCROLLPOS, 0, RTB3ScrollPoint)
    SendMessage(RichTextBox2.Handle, EM_SETSCROLLPOS, 0, New Point(RTB3ScrollPoint.X, RTB3ScrollPoint.Y))
    'SendMessage(RichTextBox2.Handle, EM_SETSCROLLPOS, 0, New Point(0, 10))
    End Sub
    End Class
    La vida loca

  • How can I get iWeb to regenerate my rss.xml file

    I use Leopard/ iWeb to create a podcast. When published to the web, the podcast consists of two pages - a home page and an archive page. The home page contains the last 5 or so postings, and the archive page contains all the other postings. Both the home page and the archive page have "Subscribe" icons/links enabling folks to subscribe to my podcast (both icons/links point to same address). So far, all pretty standard stuff.
    The focus of my problem is subscribe icon/link, or more accurately, the rss.xml file that it links to. In the past, the rss.xml feed would contain all my postings in the correct date order. Then I entered some new entries retrospectively (i.e. with dates a long time in the past) however they appear in the wrong place in the RSS feed. How can I force the RSS feed to show entries in correct date order?

    Hi,
    I've asked for this post to be moved to the [iLife > iWeb Forum|http://discussions.apple.com/category.jspa?categoryID=188] for you as that is where you are more likely to get an answer.
    Regards,
    Colin R.

  • How can i write to or read from the digital I/O of the SPIDER8 with DIADEM?

    We have the problem that we haven't found out yet how to activate the digital I/O of the HBM SPIDER8 hardware with DIADEM 6.0.

    The digital input is supported since DIAdem 3.02 the output since DIAdem 7.0.
    Maybe that the problem is the following:
    - Analog input will be measured on channel 0 up to 7
    - Digital input will be measured on channel 8 as word
    So if you would like to measure bit 3 you must add a
    F(x)-block with this function getb(d,3).
    I hope this will help you.
    Greetings
    Walter

  • How can I write a script to regularly transfer a file between two iMacs on a network?

    I keep all our family photo files (iPhoto Library) on my wife's iMac.  Because we can't share the library simultaneously, I want to automate the copying of the library from her iMac to mine say, once a week in the wee hours (it's a big file). Both of our iMacs are on our common (wired) home network.  Is there a way to write a script that will accomplish that?  If it matters, we both maintain independent external backup drives and use 'Time Machine' judiciously.  Thanks in advance for any guidance!!!

    Hi Paul,
    http://fmforums.com/forum/topic/85381-applescript-to-copy-file-from-network-volu me/
    http://stackoverflow.com/questions/5134568/copy-a-file-in-applescript

  • How can i write a code to get sume of value from days.

    Hi,
    how can i write a code to get the sum of value of days(example 1 to 30).
    This is in BPS ...
    i created multi planning area and creted planning function with {keyfigure name,planning area,days}.
    now i want to read all the actual values  from basic planing area(basic cube) and calculate the sum of the value.if you have idea can you share the code.
    ENTRIES = VARC ( 'zvardays' ).     ex(zvardays like 28 days or 29 days or 30 days or 31 days)
    COUNT = ENTRIES.
    *Get the all the days value from actual
    FOREACH PAREA = 'basic planning area'.
      COUNT = 1.
    DO
         SUM = SUM + {amount, count}      (amount is a keyfirgure value)
    ENDDO.
    COUNT = COUNT+1.
       SUMACT =  SUM.
    ENDFOR.
    can you correct the above code ....to read the values and sum of the those value.
    Thanks...

    Hi ..
    That is ok..
    Can you provide sample code for my requirement..
    and also how can i pass the error message (can you help me syntax )
    and if my acutal-total  is not equal to plan-total  then
    i have to pass the error message and then  i have to restrict save the data  how i can i restrict(user can not save the data until the values should be equal) .
    Can you help me it is very urgent..
    thanks.//
    Edited by: Eyda rose on Jun 4, 2008 9:29 PM

  • How can I write a tree report?

    How can I write a tree report? If you have any document/ link can you please send that.
    Regards,
    Subhasish

    REPORT  zdemo_alv_tree.
    Demo program prepared for ****************
    CLASS cl_gui_column_tree DEFINITION LOAD.
    CLASS cl_gui_cfw DEFINITION LOAD.
    DATA tree1  TYPE REF TO cl_gui_alv_tree_simple.
    INCLUDE <icon>.
    INCLUDE bcalv_simple_event_receiver.
    DATA: gt_sflight      TYPE sflight OCCURS 0,   " Output-Table
          gt_fieldcatalog TYPE lvc_t_fcat,         " Field Catalog
          gt_sort         TYPE lvc_t_sort,         " Sorting Table
          ok_code         LIKE sy-ucomm.           " OK-Code
    END-OF-SELECTION.
      CALL SCREEN 100.
    *&      Form  BUILD_FIELDCATALOG
    This subroutine is used to build the field catalog for the ALV list
    FORM build_fieldcatalog.
    get fieldcatalog
      CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
        EXPORTING
          i_structure_name = 'SFLIGHT'
        CHANGING
          ct_fieldcat      = gt_fieldcatalog.
    change fieldcatalog
      DATA: ls_fieldcatalog TYPE lvc_s_fcat.
      LOOP AT gt_fieldcatalog INTO ls_fieldcatalog.
        CASE ls_fieldcatalog-fieldname.
          WHEN 'CARRID' OR 'CONNID' OR 'FLDATE'.
            ls_fieldcatalog-no_out = 'X'.
            ls_fieldcatalog-key    = ''.
          WHEN 'PRICE' OR 'SEATSOCC' OR 'SEATSMAX' OR 'PAYMENTSUM'.
            ls_fieldcatalog-do_sum = 'X'.
        ENDCASE.
        MODIFY gt_fieldcatalog FROM ls_fieldcatalog.
      ENDLOOP.
    ENDFORM.                               " BUILD_FIELDCATALOG
    *&      Form  BUILD_OUTTAB
    Retrieving the data from the table and filling it in the output table
    of the ALV list
    FORM build_outtab.
      SELECT * FROM sflight INTO TABLE gt_sflight.
    ENDFORM.                               " BUILD_OUTTAB
    *&      Form  BUILD_SORT_TABLE
    This subroutine is used to build the sort table or the sort criteria
    FORM build_sort_table.
      DATA ls_sort_wa TYPE lvc_s_sort.
    create sort-table
      ls_sort_wa-spos = 1.
      ls_sort_wa-fieldname = 'CARRID'.
      ls_sort_wa-up = 'X'.
      ls_sort_wa-subtot = 'X'.
      APPEND ls_sort_wa TO gt_sort.
      ls_sort_wa-spos = 2.
      ls_sort_wa-fieldname = 'CONNID'.
      ls_sort_wa-up = 'X'.
      ls_sort_wa-subtot = 'X'.
      APPEND ls_sort_wa TO gt_sort.
      ls_sort_wa-spos = 3.
      ls_sort_wa-fieldname = 'FLDATE'.
      ls_sort_wa-up = 'X'.
      APPEND ls_sort_wa TO gt_sort.
    ENDFORM.                               " BUILD_SORT_TABLE
    *&      Module  PBO  OUTPUT
    This subroutine is used to build the ALV Tree
    MODULE pbo OUTPUT.
      IF tree1 IS INITIAL.
        PERFORM init_tree.
      ENDIF.
      SET PF-STATUS 'ZSTATUS'.
    ENDMODULE.                             " PBO  OUTPUT
    *&      Module  PAI  INPUT
    This subroutine is used to handle the navigation on the screen
    MODULE pai INPUT.
      CASE ok_code.
        WHEN 'EXIT' OR 'BACK' OR 'CANC'.
          PERFORM exit_program.
        WHEN OTHERS.
          CALL METHOD cl_gui_cfw=>dispatch.
      ENDCASE.
      CLEAR ok_code.
    ENDMODULE.                             " PAI  INPUT
    *&      Form  exit_program
          free object and leave program
    FORM exit_program.
      CALL METHOD tree1->free.
      LEAVE PROGRAM.
    ENDFORM.                               " exit_program
    *&      Form  register_events
    Handling the events in the ALV Tree control in backend
    FORM register_events.
    define the events which will be passed to the backend
      DATA: lt_events TYPE cntl_simple_events,
            l_event TYPE cntl_simple_event.
    define the events which will be passed to the backend
      l_event-eventid = cl_gui_column_tree=>eventid_node_context_menu_req.
      APPEND l_event TO lt_events.
      l_event-eventid = cl_gui_column_tree=>eventid_item_context_menu_req.
      APPEND l_event TO lt_events.
      l_event-eventid = cl_gui_column_tree=>eventid_header_context_men_req.
      APPEND l_event TO lt_events.
      l_event-eventid = cl_gui_column_tree=>eventid_expand_no_children.
      APPEND l_event TO lt_events.
      l_event-eventid = cl_gui_column_tree=>eventid_header_click.
      APPEND l_event TO lt_events.
      l_event-eventid = cl_gui_column_tree=>eventid_item_keypress.
      APPEND l_event TO lt_events.
      CALL METHOD tree1->set_registered_events
        EXPORTING
          events                    = lt_events
        EXCEPTIONS
          cntl_error                = 1
          cntl_system_error         = 2
          illegal_event_combination = 3.
    set Handler
      DATA: l_event_receiver TYPE REF TO lcl_tree_event_receiver.
      CREATE OBJECT l_event_receiver.
      SET HANDLER l_event_receiver->on_add_hierarchy_node
                                                            FOR tree1.
    ENDFORM.                               " register_events
    *&      Form  build_header
          build table for header
    FORM build_comment USING
          pt_list_commentary TYPE slis_t_listheader
          p_logo             TYPE sdydo_value.
      DATA: ls_line TYPE slis_listheader.
    LIST HEADING LINE: TYPE H
      CLEAR ls_line.
      ls_line-typ  = 'H'.
    LS_LINE-KEY:  NOT USED FOR THIS TYPE
      ls_line-info = 'ALV TREE DEMO for ****************'.
      APPEND ls_line TO pt_list_commentary.
      p_logo = 'ENJOYSAP_LOGO'.
    ENDFORM.                    "build_comment
    *&      Form  init_tree
    Building the ALV-Tree for the first time display
    FORM init_tree.
      PERFORM build_fieldcatalog.
      PERFORM build_outtab.
      PERFORM build_sort_table.
    create container for alv-tree
      DATA: l_tree_container_name(30) TYPE c,
            l_custom_container TYPE REF TO cl_gui_custom_container.
      l_tree_container_name = 'TREE1'.
      CREATE OBJECT l_custom_container
          EXPORTING
                container_name = l_tree_container_name
          EXCEPTIONS
                cntl_error                  = 1
                cntl_system_error           = 2
                create_error                = 3
                lifetime_error              = 4
                lifetime_dynpro_dynpro_link = 5.
    create tree control
      CREATE OBJECT tree1
        EXPORTING
            i_parent              = l_custom_container
            i_node_selection_mode =
                                  cl_gui_column_tree=>node_sel_mode_multiple
            i_item_selection      = 'X'
            i_no_html_header      = ''
            i_no_toolbar          = ''
        EXCEPTIONS
            cntl_error                   = 1
            cntl_system_error            = 2
            create_error                 = 3
            lifetime_error               = 4
            illegal_node_selection_mode  = 5
            failed                       = 6
            illegal_column_name          = 7.
    create info-table for html-header
      DATA: lt_list_commentary TYPE slis_t_listheader,
            l_logo             TYPE sdydo_value.
      PERFORM build_comment USING
                     lt_list_commentary
                     l_logo.
    repid for saving variants
      DATA: ls_variant TYPE disvariant.
      ls_variant-report = sy-repid.
    register events
      PERFORM register_events.
    create hierarchy
      CALL METHOD tree1->set_table_for_first_display
        EXPORTING
          it_list_commentary = lt_list_commentary
          i_logo             = l_logo
          i_background_id    = 'ALV_BACKGROUND'
          i_save             = 'A'
          is_variant         = ls_variant
        CHANGING
          it_sort            = gt_sort
          it_outtab          = gt_sflight
          it_fieldcatalog    = gt_fieldcatalog.
    expand first level
      CALL METHOD tree1->expand_tree
        EXPORTING
          i_level = 1.
    optimize column-width
      CALL METHOD tree1->column_optimize
        EXPORTING
          i_start_column = tree1->c_hierarchy_column_name
          i_end_column   = tree1->c_hierarchy_column_name.
    ENDFORM.                    " init_tree

  • How can i write the below code using "For all entries"

    Hi
    How can we write the below code using "for all entries" and need to avoid joins...
    Please help
    SELECT aaufnr aobjnr aauart atxjcd a~pspel
    agstrp awerks carbpl cwerks
    INTO TABLE t_caufv
    FROM caufv AS a
    INNER JOIN afih AS b
    ON aaufnr = baufnr
    INNER JOIN crhd AS c
    ON bgewrk = cobjid
    AND c~objty = 'D'
    WHERE ( a~pspel = space
    OR a~txjcd = space
    OR NOT a~objnr IN
    ( select OBJNR from COBRB AS e
    WHERE objnr = a~objnr ) )
    AND a~werks IN s_plant
    AND a~auart IN s_wtype
    AND NOT a~objnr IN
    ( select OBJNR from JEST AS d
    WHERE objnr = a~objnr
    AND ( dstat = 'A0081'OR dstat = 'A0018' )
    AND d~inact 'X' ).
    Reward points for all helpfull answers
    Thanks
    Ammi.

    Hi,
    SELECT objnr objid aufnr
            from afih
            into table t_afih.
    SELECT objnr
            from JEST
            into table t_JEST
            where stat = 'A0045'
               OR stat = 'A0046'
               AND inact 'X'.
    SELECT objnr
            from COBRB
            into table t_cobrb.
    SELECT arbpl werks objid objty
          from crhd
          INTO table it_crhd
          FOR ALL ENTRIES IN it_afih
          WHERE objty eq 'D'
          AND gewrk = it_afih-objid.
    SELECT aufnr objnr auart txjcd pspel gstrp werks aufnr
            FROM caufv
            INTO table t_caufv
            FOR ALL ENTRIES IN it_afih
            WHERE aufnr = it_afih-aufnr
              And pspel = ' '
              AND txjcd = ' '
             ANd objnr ne it_crhd-objnr
              AND auart in s_wtype
              AND werks in s_plant.
             AND objnr ne it_jest-objnr.
    dont use NE in the select statements, it may effect performance also. Instead use if statements inside
    loops.
    loop at t_caufv.
    read table it_chrd............
      if t_caufv-objnr ne it_chrd-objnr.
      read table it_jest..........
       if   if t_caufv-objnr ne it_jest-objnr.
        (proceed further).
       endif.
      endif.
    endloop.
    hope this helps.
    Reward if useful.
    Regards,
    Anu

  • How can i write a blog in the XI forum.....

    i want to write a blog....
    i have created a scenario which i feel ...may be helpful for many...
    how can i write that in the XI forum.....
    and do my blog need to examined by some authority

    Hi,
    Check this
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/community/gettingStartedWith+Blogs&
    Regards,
    Chandra

  • How can we write the code for opening the command prompt and closing the

    how can we write the code in java for opening the command prompt and closing the cmd prompt from eclipse (cmd prompt should close when click on the turminate button in eclipse)

    rakeshsikha wrote:
    how can we write the code for opening the command prompt and closing theBy typing in Eclipse (which you seemingly have)?

  • How can i write the floats value in Unitronics vision230 plc using modbus Ethernet

           How can i write the Float value in unitronics Vision230 PLC usinsg modbus ethernet (MB Ethernet Master Query.vi) I  read and write  the 32 bit register,  for e.g i want to write the 23.45 value on 2nd add. of MF. And MF register is 32 bit register. I  read and write  the 32 bit register.
    Narendra.
    Solved!
    Go to Solution.

     Thanks Amit for your solution but i can not use the string to write the value because  MB Ethernet master Query.vi only accepet the integer value its not take string values or any other i.e floats values etc.....otherwise i have  no problem to write or read the 32 bit register values , only problem is that the MB Ethernet master Query.vi only accept the integer value there4 how can write the float value.
    Narendra
    Message Edited by Artemistech on 01-30-2009 11:06 PM

  • How can i write the trigger for Global Temporary Table

    Hi Grus,
    How can i write the trigger for Global Temporary Table.
    I was created the GTT with trigger using the below script .
    CREATE GLOBAL TEMPORARY TABLE GLOBAL_TEMP
    EMP_C_NAME VARCHAR2(20 BYTE)
    ON COMMIT PRESERVE ROWS;
    CREATE OR REPLACE TRIGGER TRI_GLOBAL_TEMP
    BEFORE DELETE OR UPDATE OR INSERT
    ON GLOBAL_TEMP
    REFERENCING NEW AS NEW OLD AS OLD
    FOR EACH ROW
    BEGIN
    INSERT INTO EMPNAME VALUES (:OLD.EMP_C_NAME);
    END;
    trigger was create successfully, but the wouldn't insert into to EMPNAME Table..
    Please guide whether am correct or not? if not kindly give a correct syntax with example
    Thanks in Advance,
    Arun M M

    BEGIN
    INSERT INTO EMPNAME VALUES (:OLD.EMP_C_NAME);
    END;
    you are referencing old value in insert stmt.
    BEGIN
    INSERT INTO EMPNAME VALUES (:new.EMP_C_NAME);
    END;then run ur application it works fine...
    CREATE GLOBAL TEMPORARY TABLE GLOBAL_TEMP
    EMP_C_NAME VARCHAR2(20 BYTE)
    ON COMMIT PRESERVE ROWS;
    CREATE OR REPLACE TRIGGER TRI_GLOBAL_TEMP
    BEFORE DELETE OR UPDATE OR INSERT
    ON GLOBAL_TEMP
    REFERENCING NEW AS NEW OLD AS OLD
    FOR EACH ROW
    BEGIN
    dbms_output.put_line(:OLD.EMP_C_NAME||'yahoo');
    INSERT INTO EMPNAME VALUES (:new.EMP_C_NAME);
    dbms_output.put_line(:OLD.EMP_C_NAME);
    END;
    create table EMPNAME as select * from GLOBAL_TEMP where 1=2
    insert into GLOBAL_TEMP values('fgfdgd');
    commit;
    select * from GLOBAL_TEMP;
    select * from EMPNAME;
    output:
    1 rows inserted
    commit succeeded.
    EMP_C_NAME          
    fgfdgd              
    1 rows selected
    EMP_C_NAME          
    fgfdgd              
    1 rows selectedgot it Arun
    Edited by: OraclePLSQL on Dec 28, 2010 6:07 PM

  • How can I write bits through the COM1 serial port?

    I'm trying to write bits through the serial port COM1.
    Labview "Write VI" only writes everything in string. It seems. How can I write bit by bit through COM1?
    Thank you,
    Van

    Serial transmission (COM port) protocol requires sending a group of bits at one time. You cannot just send one bit. Standard COM port settings must be either 7 or 8 data bits, 1 or 2 stop bits, etc... You have to group your bits 7 or 8 at a time. You could probably send a 0 byte or a 1 byte. This would be like sending 0000 0000 for a low bit and 0000 0001 for a high bit. Your receiving end would have to know how to interpret what you are sending if you choose this method. Of course you have to convert your byte into a string before sending to COM port. Wire a U8 data type to a Build Array input. Then wire the array output to a Byte Array to String input. The output of this function will be the character representation of your byte suitable for sending acr
    oss a serial port.
    - tbob
    Inventor of the WORM Global

Maybe you are looking for

  • How do I delete time machine backups if I can't zoom back in time?

    Hi, I'v been backing up my 250GB HD using time machine very successfully over the years. I store additional home movies that aren't on my HD on my time capsule machine in a seperate folder from the backups that are made daily. My 250GB HD is now full

  • String to number and Number to String Problem!

    Hi All, In my report i ahve to display the Date. From DB i am getting 4 digit string( 2008). Using that i have to display as 08 - 09 In that i used RIGHT function. it is diplayed as 08 - 9. when i take 2 character from right '08' is coming. Then i co

  • Producing PDFs with 3D content on Mac OS X

    Hello everybody, Point 1: I am looking for the best workflow of producing PDFs with 3D content. Point 2: We are design studio that works entirely on Mac platform, so there is no chance of having Acrobat Pro Extended in the workflow. (Yes, of course,

  • Deploy failed

    Hi, I started with WAS 6.40 and Eclipse. I made the tutorial with the calculator. I finished without errors, the only I had to make is to deploy. But then I got a lot of errors 30.11.2005 09:42:19 /userOut/deploy (com.sap.ide.eclipse.sdm.threading.De

  • How to cope with sytem noise of DAQ?

    I found that my system noise is too much for my data acquisition. the frequency range of the noise is so wide and the magnitude is comparable to my useful data. Waht can I do to acquire my data?