Updating ARRAYs in the Database

Hi,
I'm having serious trouble with the code below. I'm attempting to create a method
in the SQL bean that will pass an Array to an Oracle function.
I have followed WebLogic's documentation on this, but I get the following error
when I run the code:
Problem in descriptor: Unsupported feature
------> EXCEPTION in setProspectsInfo: Invalid argument(s) in call
Any suggestions?
public void setProspectsInfo(Customer mycustomer) throws Exception {
CallableStatement cssn = myConn.prepareCall("{call ? := pkg_prospects.fn_ProspectsMain(?)}");
try{
Vector myVector = new Vector();
myVector.addElement(mycustomer.getUniqueIdStr());
//myVector.addElement(null);
myVector.addElement(mycustomer.getFirstName());
myVector.addElement(mycustomer.getLastName());
myVector.addElement(mycustomer.getMiddleInitial());
myVector.addElement(mycustomer.getApartmentNumber());
myVector.addElement(mycustomer.getBestTimeToCall());
myVector.addElement(mycustomer.getCity());
//myVector.addElement(mycustomer.getContactNote());
myVector.addElement(mycustomer.getDaytimePhone());
myVector.addElement(mycustomer.getEmailAddress());
myVector.addElement(mycustomer.getHomePhone());
myVector.addElement(mycustomer.getMailingAddress1());
myVector.addElement(mycustomer.getMailingAddress2());
myVector.addElement(mycustomer.getSocialSecurityNumber());
myVector.addElement(mycustomer.getState());
myVector.addElement(mycustomer.getTitle());
myVector.addElement(mycustomer.getZipCode4());
myVector.addElement(mycustomer.getZipCode5());
myVector.addElement(mycustomer.getBorrowerType());
String[] myStrings = new String[myVector.size()];
myStrings = (String[]) myVector.toArray(myStrings);
weblogic.jdbc.vendor.oracle.OracleArray myArray = null;
try {
//oracle.sql.ArrayDescriptor myDesc = oracle.sql.ArrayDescriptor.createDescriptor("STRARRAY",
myConn);
//myArray = new ARRAY (myDesc, myConn, myStrings);
//myArray.toString();
myArray = (weblogic.jdbc.vendor.oracle.OracleArray) cssn.getArray("STRARRAY");
//myArray.toString();
} catch (Exception e) {
System.out.println("Problem in descriptor" + e.getMessage());
cssn.registerOutParameter(1, OracleTypes.NUMBER);
cssn.setArray(2, myArray);
     cssn.execute();
catch ( Exception e ){
System.out.println("------> EXCEPTION setProspectsInfo" + e.getMessage());
throw new Exception(e);

"Slava Imeshev" <[email protected]> wrote in message news:[email protected]..
"Mike Flowers" <[email protected]> wrote in message news:[email protected]..
public void setProspectsInfo(Customer mycustomer) throws Exception {
CallableStatement cssn = myConn.prepareCall("{call ? := pkg_prospects.fn_ProspectsMain(?)}");
try{
Vector myVector = new Vector();
myVector.addElement(mycustomer.getUniqueIdStr());
//myVector.addElement(null);
myVector.addElement(mycustomer.getFirstName());
myVector.addElement(mycustomer.getLastName());
myVector.addElement(mycustomer.getMiddleInitial());Totally apart from question why it doesn't work - passing parameters
to a stored procedure is not such a good idea and in fact it'is very
error prone.I meant passing parameters to an SP the way you do.
Slava

Similar Messages

  • Update array value into database

    Hi, I would like to enquire if there is any way to update an array in the database.
    As an example, i have an array which contain the value of the operating hour. I am able to insert the array value successfully into the database. Now i have problem to update the database, for these arrays.
    Any suggestion will be very much appreciated.
    Thank you in advance.

    fizRiani wrote:
    the field type is a string arrayReally? Have never seen that before in databases. Aren't you confusing database field type with Java object type?
    the actual data represent the different operating hour that has to be inserted and updated to the database.I would rather use a chain table. Read on about database normalization.

  • Updating data in the database table

    Can any help me in the code for updating data in the database table.
    Regards,
    Rahul

    Hi Rahul,
    A slightly longer procedure that i'm adding here...
    1.) Create the component (i'm sure you have this covered)
    2.) Next on the button click that updates the database - add an action.
    3.) double click the action so that you are taken to the methods section of the view.
    4.) next you need to add the code that is required the update the database - this will be in the form of the above two posts.
    5.) compile and test the application
    Let me know in case you need further information on how to do this with a function module or something.
    Thanks.

  • How to update data in the database through ALV grid

    Hi All,
    I diplayed an ALV grid with five fields in a classical report. I have already set the fieldcat for one field as wa_fcat_edit = 'X'. I am able to edit(modify) the data in that field. But I want to update the data into the database which is modified by me in that field. Can I update the data using BDC or any other procedure?
    This is an urgent require ment for me. Please help me ASAP.
    Thanks & Regards,
    Ramesh.

    Hi
    Please go through the link.
    Link: [http://www.****************/Tutorials/ALV/Edit/demo.htm]
    regards
    ravisankar

  • Update Column on The Database After Printing a Report Using BI Publisher

    I need to update a flag on the database to say that a report has been printed. As the report is generated from the branch, I can't work out when and where to run my update process.
    Any help would be appreciated.

    2 things..
    1) Please update your forum handle to a more FRIENDLY name.. We are a friendly group here and do NOT bite (much..)
    2) Please try searching the forum for past articles before posting a new thread. There have a been a posting sin regards to your issue in the past 3 months..: http://forums.oracle.com/forums/search.jspa?objID=f137&q=rich+text+bi+publisher
    Seems to be an issue of the RTF file containing reserved characters used in the XML file used to submit to Bi Publisher from APEX..
    Thank you,
    Tony Miller
    Webster, TX
    Never Surrender Dreams!
    JMS
    If this question is answered, please mark the thread as closed and assign points where earned..

  • Storing an array into the database using jdbc

    Hi,
    i�ve got a problem storing an array into a database. I want to store objects consisting of several attributes. One of these attributes is an array containing several int values. I don�t know exactly what is the best way to store these objects into a database. I have created two tables connected by a one to many relationship of which one stores the array values and the other table stores the object containing the array. Is that ok or should I use another way. It�s the first time I�m trying to store objects containing arrays into a database so I�m very uncertain in which way this should be done.
    Thanks in advance for any tips

    1. You should use blob or longvarbianry type colum to stor that array.
    2. All object in that array should be Serializable.
    3. Constuct a PreparedStatement object
    4. Convert array to byte[] object
    ByteArrayOutputStream baos=null;
    ObjectOutputStream objectOutputStream=null;
    baos = new ByteArrayOutputStream(bufferSize);
    objectOutputStream = new ObjectOutputStream(baos);
    objectOutputStream.writeObject(array);
    objectOutputStream.flush();
    baos.flush();
    byte[] value=baos.toByteArray();
    5. Now you can use PreparedStatement.setBytes function to insert byte[] value.

  • Update Statistics for the database MS-SQL

    hi all ,
    I want to run the statistics programmatically ( update statistics ) and our database is MS-SQL. Can any one tell me which is the suitable function module to do the same.
    Thanks,
    Ram

    If you did not find this - I found the function module 'update_stats'.
    How this helps
    Or maybe you found somthing else?

  • Updating records in the database problem...

    hi, hello to all members, my problem is this, i can't update my records, my table name is UsrTable with a two fields only, which UsrName and Password. all i want to do is when the user wants to sign up and enters there username and password the database will be updated of the new record. i paste the sorce code in here to make it precise co'z i cant figure out how to update the database, sorry if the coding is too long and not good , im just a beginner in JAVA especially using JDBC.
    ****START CODE*****
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import java.sql.*;
    public class SignIn extends JFrame
    private JPanel jInput;
    private JPanel jButton;
    private JButton Savebtn,Exitbtn;
    private JLabel userlbl,passlbl,connectionLabel;
    private JTextField Usertxt;
    private JPasswordField Passtxt;
    public static final String DRIVER = "sun.jdbc.odbc.JdbcOdbcDriver";
    public static final String url = "jdbc:odbc:UserInfo";
    public static final String DATABASE = "\\User.mdb";
    private Connection connect ;
    public String tmpUser,tmpPass,query;
    public SignIn()
    super("Create your Account..");
    setResizable(false);
    ImageIcon imgIcon = new ImageIcon("c:/JavaCourseware/Images/cdicon.jpg");
    this.setIconImage(imgIcon.getImage());
    addWindowListener(new WindowAdapter()
    { // Opens addWindowListener method
    public void windowClosing(WindowEvent e)
    { // Opens windowClosing method
    int result;
    result = JOptionPane.showConfirmDialog( null,"Are you sure you want to exit?",
    "Confirmation Required...", JOptionPane.YES_NO_OPTION );
    if(result == JOptionPane.YES_OPTION)
    System.exit(0);
    else
    return;
    } // Closes windowClosing method
    }); // Closes addWindowListener method
    try
    InitComp();
    catch(Exception e)
    public void InitComp() throws Exception
    Usertxt = new JTextField(15);
    Passtxt = new JPasswordField(15);
    connectionLabel = new JLabel();
    userlbl = new JLabel("Enter your username: ");
    passlbl = new JLabel("Enter your password: ");
    Savebtn = new JButton("Save");
    Exitbtn = new JButton("Exit");
    this.setSize(new Dimension(320,150));
    this.setLocationRelativeTo(null);
    this.getContentPane().setBackground(Color.blue);
    connectionLabel.setForeground(Color.YELLOW);
    connectionLabel.setBackground(Color.BLUE);
    connectionLabel.setFont(new Font("Arial", Font.PLAIN , 12));
    buildTxtInput();
    buildBtn();
    this.getContentPane().add(connectionLabel,BorderLayout.NORTH);
    this.getContentPane().add(jInput,BorderLayout.CENTER);
    this.getContentPane().add(jButton,BorderLayout.SOUTH);
    //make a connection
    try
    //url = "jdbc:odbc:UserInfo";
    Class.forName(DRIVER);
    connect = DriverManager.getConnection(url);
    connectionLabel.setText("You have made a successful connection to: " + DATABASE);
    catch(ClassNotFoundException cnfx)
    cnfx.printStackTrace();
    connectionLabel.setText("Connection unsuccessful" + cnfx.toString());
    catch (SQLException sqlx)
    sqlx.printStackTrace();
    connectionLabel.setText("Connection unsuccessful" + sqlx.toString());
    catch (Exception ex)
    ex.printStackTrace();
    connectionLabel.setText("Connection unsuccessful" + ex.toString());
    Savebtn.addActionListener(new ActionListener()
    public void actionPerformed(ActionEvent e)
    try
    Statement state = connect.createStatement();
    if (Usertxt.getText().equals("") && Passtxt.getText().equals(""))
    connectionLabel.setText("Invalid Input!");
    JOptionPane.showMessageDialog( null, "Invalid Entry", "Saving Abort...", JOptionPane.INFORMATION_MESSAGE );
    state.close();
    else
    state.executeUpdate("INSERT INTO UsrTable" +
    "VALUE UsrName = '" +
    Usertxt.getText() +"' AND Password = '" +
    Passtxt.getText() +"'");
    JOptionPane.showMessageDialog(null, "Your account is already created!","Thank you...",
    JOptionPane.INFORMATION_MESSAGE);
    state.close();
    catch (SQLException sqlex)
    sqlex.printStackTrace();
    connectionLabel.setText(sqlex.toString());
    });//end of Save Listener
    public static void main(String args[])
    SignIn Signfrm = new SignIn();
    Signfrm.show();
    private void buildTxtInput()
    jInput = new JPanel();
    jInput.setLayout( new GridLayout(2, 2, 0, 10) );
    //user.setForeground(Color.yellow);
    jInput.setBorder(BorderFactory.createTitledBorder(""));
    //pass.setForeground(Color.yellow);
    jInput.add(userlbl);
    jInput.add(Usertxt);
    jInput.add(passlbl);
    jInput.add(Passtxt);
    private void buildBtn()
    jButton = new JPanel();
    jButton.setLayout( new GridLayout(1, 1, 10, 10) );
    jButton.setBorder(BorderFactory.createRaisedBevelBorder());
    jButton.add(Savebtn);
    jButton.add(Exitbtn);
    }//end of class
    ***END PROGRAM***
    im hoping there's someone can help me with this, co'z im badly need it.thanks..again,

    hi! i followed your code, but i get a different error i dont know what is the meaning of error, first heres my code i write...thanks for the fast reply co'z i badly need it.
    Savebtn.addActionListener(new ActionListener()
    public void actionPerformed(ActionEvent e)
                   String password = new String (Passtxt.getPassword());
    if (IDtxt.getText().equals ("")) {
                        JOptionPane.showMessageDialog (null, "Member's Id not Provided.");
                        IDtxt.requestFocus();
    else if (Usertxt.getText().equals ("")) {
                        Usertxt.requestFocus();
                        JOptionPane.showMessageDialog (null, "Username not Provided.");
                   else if (password.equals ("")) {
                        Passtxt.requestFocus();
                        JOptionPane.showMessageDialog (null, "Password not Provided.");
                   else {
                        try {     //INSERT Query to Add Book Record in Table.
                             String q = "UPDATE UsrTable "+"SET UsrName = '"+Usertxt.getText() + "' " +
    "AND Password = '" + password + "'"+"WHERE ID = '" + ID + "'";
                             int result = st.executeUpdate(q);                              if (result == 1) {               .
                                  JOptionPane.showMessageDialog (null, "New User has been Created.");
                                  Usertxt.setText ("");
                                  Passtxt.setText ("");
                                  Usertxt.requestFocus ();
                             else {                                                        JOptionPane.showMessageDialog   (null, "Problem while Creating the User.");
                                  Usertxt.setText ("");
                                  Passtxt.setText ("");
                                  Usertxt.requestFocus ();
                        catch (SQLException sqlex) { }
    and heres the error...
    java.lang.NullPointerException
    at CreateAcc$3.actionPerformed(CreateAcc.java:179)
    at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1786)
    at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:1839)
    at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
    at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
    at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:245)
    at java.awt.Component.processMouseEvent(Component.java:5100)
    at java.awt.Component.processEvent(Component.java:4897)
    at java.awt.Container.processEvent(Container.java:1569)
    at java.awt.Component.dispatchEventImpl(Component.java:3615)
    at java.awt.Container.dispatchEventImpl(Container.java:1627)
    at java.awt.Component.dispatchEvent(Component.java:3477)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3483)
    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3198)
    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3128)
    at java.awt.Container.dispatchEventImpl(Container.java:1613)
    at java.awt.Window.dispatchEventImpl(Window.java:1606)
    at java.awt.Component.dispatchEvent(Component.java:3477)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:456)
    at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:201)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)

  • Objects are updated/created in the database in wrong order

    Hello,
    I have three objects tied with certain relations: Ticket, Type and
    Solution.
    Relation between Ticket and Solution is unidirectional one-to-one - ticket
    may contain one solution. Relation between Type and Solution is one-to-many
    bi-directional.
    During transaction I do the following:
    1) instantiate new Solution and add it to the Type;
    2) set this Solution to the Ticket.
    On commit Kodo tries to update ticket before creating solution in the
    database. What am I doing wrong?
    Thank you in advance.
    Best regards,
    Alexey Maslov

    Alex,
    Thank you. It worked :)
    "Alex Roytman" <[email protected]> wrote in message
    news:[email protected]...
    The best way to handle update/insert order is not to rely on it. Not only
    foreign key sensitive to order but unique constraints too. So if your
    database supports it (and most decent databases do) use defferred
    constraints - the ones which get applied on commit not on
    insert/update/delete and you will be fine
    "Alexey Maslov" <[email protected]> wrote in message
    news:[email protected]...
    Patric,
    Thank you for response.
    It's not about Type->Solution relation. We've got constraint from
    Ticket
    to Solution. But we need to load Ticket to get it's Type.
    It's a problem to instantiate the Solution before loading Type. Thething
    is that Type object is used to construct Solution automatically adding
    it
    to
    internal collection.
    This is done to overcome JDO deficiency in relation maintenance. I'vefound
    this pattern in Robin Roos' book.
    create...() method usage makes sure that dependent object is added tothe
    parent after each creation. Adding objects manually after creation wouldbe
    error-prone and code-cluttering.
    Where's that "transparency" so much told about on JDOCentral?
    P.S. I wonder how this pattern works in other places?
    "Patrick Linskey" <[email protected]> wrote in message
    news:[email protected]...
    Alexey,
    In Kodo JDO 2.3 and 2.4, object changes are flushed to the database in
    the order that the objects are first enlisted in the transaction. So,
    if
    you instantiate the Solution object before loading Type, everything
    should work the way you want it to.
    We have more sophisticated foreign key constraint satisfaction code in
    internal codebases -- expect to see this hit production in the nextfew
    months.
    -Patrick
    Alexey Maslov wrote:
    Hello,
    I have three objects tied with certain relations: Ticket, Type and
    Solution.
    Relation between Ticket and Solution is unidirectional
    one-to-one -
    ticket
    may contain one solution. Relation between Type and Solution is
    one-to-many
    bi-directional.
    During transaction I do the following:
    1) instantiate new Solution and add it to the Type;
    2) set this Solution to the Ticket.
    On commit Kodo tries to update ticket before creating solution inthe
    database. What am I doing wrong?
    Thank you in advance.
    Best regards,
    Alexey Maslov
    Patrick Linskey [email protected]
    SolarMetric Inc. http://www.solarmetric.com

  • Problem while updating record in the database

    I have created an entity object, view object and a form to show that. whenever i update some field in the form and try to commit the change, exception is thrown stating that-
    (oracle.jbo.DMLException) JBO-26080: Error while selecting entity for Countries
    ----- LEVEL 1: DETAIL 0 -----
    (java.sql.SQLException) [DataDirect][SQLServer JDBC Driver][SQLServer]FOR UPDATE cannot be specified on a READ ONLY cursor.

    I'm getting the same problem. Did you manage to fix this?

  • How to update values to the database?

    hi all!
    iam using a simple form where some 4 or 5 textitems are used.
    with a select query, iam selecting a particular record.
    say, if i update a particular value(column), then how can
    i make the code in such a way that only particular column is
    updated.
    p.s:
    my query shud not update all the column values.
    is anyone can help me?
    thanks.

    Maybe you can use the following to find out where the cursor is, then check if that field has been updated:
    SYSTEM.CURSOR_ITEM
    Description
    SYSTEM.CURSOR_ITEM represents the name of the block and item, block.item, where the input focus (cursor) is located.
    The value is always a character string. hi Bob!
    hope this logic works out.But can u explain with some code sample.
    Thanks a lot.

  • How do i update the current time to the database ?

    Hi guys...
    How do i connect the "Date/Time string" to the DB Tools Update Data.vi ??? Is it connect it to the point/pin called "condition" of DB Tools Update Data.vi ?
    I am kind of confuse of how do i connect...
    Thanks in Advance.
    Attachments:
    Att taking.png ‏102 KB

    This is the error i get...{    NI_Database_API.lvlib:Cmd Execute.vi->NI_Database_API.lvlibB Tools Update Data.vi->FYP_3.1.vi<ERR>ADO Error: 0x80040E14
    Exception occured in Microsoft OLE DB Provider for ODBC Drivers: [Microsoft][ODBC Microsoft Access Driver] Syntax error in UPDATE statement. in NI_Database_API.lvlib:Rec Create - Command.vi->NI_Database_API.lvlib:Cmd Execute.vi->NI_Database_API.lvlibB Tools Update Data.vi->FYP_3.1.vi  }
    When u scans a card, it will show you your information with the Current Time/Date on the table. and update it on the database....
    I try the example of DB tools update data vi .. it make me more confuse :l

  • Updating policies and Policy Database or Policy Updates without server restart

    Hi again,
    I have implemented the flash access reference implementation server including setting up all example database tables (so we have a central database server).  I have started updating policies for the application "whitelist" features and have run into some questions below.
    The Protecting Content documentation states:
              "If your license server has access to a database for storing policies, you can retrieve the updated policy from the database and call LicenseRequestMessage.setSelectedPolicy()"
    This leads to two questions:
    1)  The reference implementation doesn't store any Policies in the database (it stores them on the filesystem in the Resources Directory).     I can not find any documentation or examples of how to "retrieve the updated policy from the database".     Can somebody please point me to an example or documentation on how to store policies in the database so I can simply LicenseRequestMessage.setSelectedPolicy()?
    2)  As the reference implementation stores policies on the disk I had to use policy update lists when I whitelisted an AIR app.     However, the reference server did not honor the policy update list till I restarted the flash access reference server.      How can I notify the flash access server of the change to the update policy list without restarting the server?
    Thank you,
    -R

    Hello,
    Please see my answers below.
    Answer 1>
    If you want to store the binary representation of the policy in the database, you can invoke Policy.getBytes() and store the returned byte[] as a blob in the database. For details on how to store such binary data in a database, you should consult the documentation for you database. Then, to rebuild a policy that had been stored in a database, you can obtain the byte[] stored in the database, and invoke new Policy(byte[]) with it to reconstruct that policy instance.
    See the following javadocs:
          * Retrieves an encoded byte array representation of the policy.
          * <p>If this <code>Policy</code> was created from an empty constructor, the revision number
          * will be <code>1</code>.  If this was an existing policy and changes were made to the policy,
           * the revision number will be incremented by one. Otherwise, the revision number will not change.</p>
          * <p>The validity of the policy is first checked before encoding into a byte array.  Encoding will fail
          * if {@link #checkValidity()} throws an exception.</p>
           * @return A serialized representation of the policy.
          * @throws PolicyModificationException The <code>Policy</code> cannot be serialized because it was created with a newer version and was modified.
          * @throws PolicyException The <code>Policy</code> is missing required fields or contains conflicting entries.
          * @throws EncodingException Unable to encode the <code>Policy</code> to a byte array.
          public byte[] getBytes() throws PolicyException, EncodingException;
          * This constructor parses an existing policy from the given byte array.
           * @param policy The policy from which to construct this <code>Policy</code>.
          * @throws EncodingException Unable to parse the byte array into a <code>Policy</code>.
          * @throws PolicyException The <code>Policy</code> is missing required fields or contains conflicting entries.
          public Policy( byte[] policy ) throws PolicyException, EncodingException;
    Answer 2>
    In order to implement automatic configuration updates of policy update lists on the flash access server, you will need to tweak the Reference Implementation code, to monitor the file update state and re-load the PolicyUpdateList if it changes. The code snippet below, taken from the com.adobe.flashaccess.refimpl.util.ParamsReader.buildHandlerConfiguration() method, should serve as an example of how the PolicyUpdateList is loaded and then set on the HandlerConfiguration instance for it to take effect for a particular license acquisition request. In the case of the reference implementation, this code (below) is only invoked once, during server initialization. That is why a server restart is necessary for subsequent changes to take effect. However, nothing prevents this code form being invoked elsewhere, and that implementation is entirely upto the customer, to achieve the desired outcome.
          PolicyUpdateList pul = PolicyUpdateListFactory.loadPolicyUpdateList(pulInputStream);
          if (pul != null)
                X509Certificate issuerCert = null;
                if (hsmEnabled)
                      issuerCert = getHSMCertificate(props, hsmUtils, "RevocationList.verifySignature.X509Certificate");
                else
                      String pulSignatureCertFile = props.getProperty("RevocationList.verifySignature.X509Certificate");
                      if (pulSignatureCertFile != null)
                            InputStream pulSignerInputStream = new FileInputStream(resourcesDir + pulSignatureCertFile);
                            issuerCert = CertificateFactory.loadCert(pulSignerInputStream);
                if (issuerCert != null)
                      pul.verifySignature(issuerCert);
                      context.setPolicyUpdateList(pul);
    Regards,
    Safdar

  • I need to take elements from within 2 nested for loops and place them in an array at the specific row and column that I need.

    I have tried intializing an array and replacing elements by specifying a particular row, and column, but in the end I get an array with only one element replaced, and I suspect that it is because as the for loops are running through their iterations each time the array is re-initializing. I have a simple vi that I will post below, it is not the exact situation that I have but is a good place for me to get some understanding. I have the row and column indexes being driven by the inner and outer loop iterations, which gives me the pattern I need. I am using the inner iterations as array elements. How do I set this up so that it works and d
    oes keep re-initializing my array.
    Attachments:
    Untitled.vi ‏26 KB

    I have fixed a number of things in your vi.
    You were right in thinking that the array was continuously re-initialized. To avoid this, use a shift register (right-click the loop border), which will pass the updated array into the next iteration.
    Chilly Charly    (aka CC)
             E-List Master - Kudos glutton - Press the yellow button on the left...        
    Attachments:
    your_vi.vi.zip ‏13 KB

  • MYSQL JSP  Storing array to a database

    I have an combobox by which multiple values can be selected. I need to store the values available in the combo box into mysql database as an array in the database.
    eg:
    If I select one,two,three,four as values for the number field
    then in the db it should be shown like this
    name | values
    number | one
    | two
    | three
    | four

    Ok here is the sample code
    Table in db
    mysql> create table test (a INT NOT NULL, b SET('USA', 'India', 'Pakistan', 'Russia'));
    First.htm (say)
    <html>
    <body>
    <form name="frm" action="Test.jsp" method="post">
    <input type=text name="na" >
    <select size="1" name="a8" tabindex="7" multiple>
    <option>India</option>
    <option>USA</option>
    <option>Russia</option>
    <option>Pakistan</option>
    <input type="submit" name="abc" value="ok">
    </form>
    </body>
    </html>
    First.jsp
    <%@ page language="java" import="java.sql.*"%>
    <html>
    <head>
    <title>Testing SET in MySQL</title>
    </head>
    <body>
    <%
    String arr[] = request.getParameterValues("a8");
    String strToInsert = "";
    for(int i=0; i<arr.length; i++) {
    if(i==arr.length-1) {
    strToInsert += arr;
    } else {
    strToInsert += arr[i] + ",";
    out.println(strToInsert);
    String strID = request.getParameter("na");
    int iID = Integer.parseInt(strID);
    Class.forName("Driver");
    Connection con = DriverManager.getConnection(
    "jdbc:mysql://localhost:3306/dbName?user=username&password=password");
    Statement stmt = con.createStatement();
    stmt.executeUpdate("insert into test values("+iID+", '"+strToInsert+"')");
    %>
    </body>
    </html>
    I assume that int value will be sent in text filed named "na".
    Above file will insert record in db.....

Maybe you are looking for

  • Accounts Payable Trial Balance in R-12 report rows don't balance

    Hi, Background: I am in a municipal government using encumbrance accounting in R-12. In 11i the AP Trial Balance (APTB) always balanced line for line when comparing the ORIGINAL AMOUNT to the AMOUNT REMAINING. This is not always the case in R-12. In

  • Are you drawing text at an angle with TextRenderer?

    This is a question for folks that are aware of the difference in quality of output between TextRenderer.DrawText and (Graphics.DrawString + Graphics.TextRenderingHint = Text.TextRenderingHint.AntiAlias). It is an issue that has been discussed by othe

  • How to create search function (af:query) using method in java

    hi All..:) i got problem with search custom (af:query), how to create search function/ af:query using method in java class? anyone help me.... thx agungdmt

  • Stamping tiff images

    Hello, I'm looking for a way in Java to stamp tiff images. The images have the following criteria: format A4, single page, black and white, g4 compressed, single strip offset. A formatted number has to be added in the right upper corner of each image

  • [OSX] Photoshop CC bug - can't change Shape Layer colour from layers panel

    Hi there, I have a persistent bug where after a certain amount of time (potentially after the iMac goes to sleep and reawakes?) that after creating a new Shape Layer I can no longer change it's colour from the layers panel. If I double-click it the c