Saving Arrays to database???

Hi! I'am new on Jsp and I want to save values that the user add into a combobox. I Have a Save_action.jsp that executes when the user click on the submit button. So I want the array values to be saved into the database + be updated. Here is the problem area in Sava_action.jsp
<%
     String update="";
     Long aCustomerId = aCustomerSession.getCustomer().getCustomerId();
     String[] aIPAddressAllow = request.getParameterValues("IPAddressAllow");
     String[] aEmailAllow = request.getParameterValues("emailAllow");
     String atruncuationMode = request.getParameter("truncuationMode");
     String aoriginatorTemplate = request.getParameter("originatorTemplate");
     String amessageTemplate = request.getParameter("messageTemplate");
     String areceiptActive = request.getParameter("receiptActive");
     String arecipientInMailSubject = request.getParameter("recipientInMailSubject");
     ResultSet aResultSet;
     ICDatabase aDatabase = new ICDatabase();
     //Here is my problem??? What shell I write??
     for (int i = 0; i < aIPAddressAllow.length; i++) {
          if (aIPAddressAllow != null)
for (int l = 0; l < aEmailAllow.length; l++) {
          if (aEmailAllow != null)
     update = "UPDATE tM2SMSSettings Set IPAddressAllow='" + aIPAddressAllow[0] +"', emailAllow='" + aEmailAllow[0] +"', truncuationMode='" + atruncuationMode +"', originatorTemplate='" + aoriginatorTemplate +"' ,messageTemplate='" + amessageTemplate +"' , receiptActive=" + areceiptActive +", recipientInMailSubject=" + arecipientInMailSubject +" WHERE customerId=" + aCustomerSession.getCustomer().getCustomerId();
     aResultSet = aDatabase.sql(update);
response.sendRedirect(response.encodeRedirectURL("customerm2sms.jsp"));
%>

this is a way but if i see it correctly for each ip adress you'll be adding the emailadresses...
if that is what you need, then just put the for integer in th array (i for ip and l for email).
greetings

Similar Messages

  • Error saving job  to database for standard jobs scheduling

    Hi,
        In IDES server when iam goto Tr.code -- SM36 -- Standard Jobs -- Default Scheduling iam getting below error.
    Error saving job  to database
    Message no. BT117
    Diagnosis
    The SAP system was unable to save the current job in the database. This failure suggests that there is a problem with the database system or with the network connections between the SAP application servers and the database system.
    System Response
    Job not saved and not scheduled.
    Procedure
    To analyze this problem, start by checking the system log for messages about network or database problems.  You can also use the computing center management system to check your system for problems.
    Guide me for the same.
    Thanku

    HI,
    Sometimes this error will come.
    Try to schedule jobs manually using SM36 instead of using standard job button.
    Also you can check this thread
    Re: Error saving job SAP_REORG_JOBS to database
    Which seems to report same problem.
    Its nothing to take with database conenctivity as SAP is up and running .
    Try this and revert.
    Regards,

  • Saving Forms in Database

    Hi All,
    We are being unable to save a form into the database.
    This form is all along been saved in the database and it is one
    of the common forms which we use throughout our applications and it basically contains common blocks , procedures which are used or referenced by all file system forms across the application.
    The problem has started recently after we did some changes in it and then again try to store it back into the database. Basically we store another form (900KB) in DB along with this one (2200KB),
    I have tested, with the other form already in the database we
    are not being able to save a form of this big size in the
    database, whereas it allows us to save the form only if its size
    is less than 1600KB. That means it is a form size related issue.
    If anybody has faced similar problem and know if there is any
    change or tuning required in any of the database schema objects
    then please help me. Its a mission critical problem for our
    organisation.
    ORACLE PEOPLE PLEASE HELP US !
    We are using forms 4.5 with Oracle 8.0.6 on MS WindowsNT 4.0.
    Thanks in advance.

    Yes Grant, we get error message :
    The Windows Error (F50des32.exe - Application error) :The
    instruction at "0x5d9e9280" referenced memory at "0x0001567a".
    The memory could not be "read".
    Basically we have two forms in the database, say form1 and form2. Form2 itself is referencing objects in form1, and both these forms are referenced by other filesystem forms. We are unable to save the form2 but not the form1.
    Each time we try to save the Form2 in the database we are facing the problem. Form1.fmb is of the size 828KB, whereas Form2.fmb is 2200KB. Is the problem related to the size of the form ? I believe these forms are stored in the SYSTEM tablespace, I checked the system tablespace, its used 117MB and is 22MB free, initial extent is 122880 and next is 122880 with max
    extent 300.
    This problem is having in all our test databases and is not
    really related to any particular machine (statistics given is of
    one of our test database).This problem may have occured before
    but I am not sure as we are in need to change in the database
    forms first time after I have taken over responsibility.Please
    look into the problem with high priority as we are in need to
    update live applications ASAP.

  • Resultset in the same order as saved in the database

    Hi Folks!
    I'm having some trouble with an old development, because for some really strange reason, the same select statement i'm getting the same records but in different order from time to time randomly.
    For example in day 1 i can get:
    1 Text1
    2 Text2
    3 Text3
    And in day 2 i can get:
    1 Text2
    2 Text3
    3 Text1
    Is there a way to force the select statement so it always get it in the order as saved in the database?
    Hope someone can help me with this pretty strange issue.
    Thanks.
    Regards,
    Gilberto Li

    Hi Neil,
    Your answer makes a lot of sense to me. And I agree that it might won't guarantee that bypassing the buffer will work 100%. However i'm still going to make a try see if it works, and how good it works.
    What i'm thinking is that I will need to redesign this old development and insert a new field to a table to add a position so I can order after the select statement.
    But if someone still have any other solution i will appreciate your help.
    Thanks again.
    Regards,
    Gilberto Li

  • All the attachments both in SRM and R/3 must be saved in IXOS database

    Dear all,
    I am having the following requirements:
    We are creating Shopping Cart in SRM with attachments and these attachments are saving in the IXOS database. All these (same attachments) are relpicating to R/3 whenever system generates PR or PO automatically. These attachments are copying to R/3 with URL, which is picking from IXOS, i.e. physically attachments are not saving R/3 DMS server, but saving in IXOS DB only. It is to avoid duplicate saving in both Data bases.
    If user making any changes in the attachments or adding attachments in R/3, these new ones are at present saving in R/3 (DMS) data base, but not in the IXOS data base. Now our client requirement is that all the attachments, whether attached in SRM or R/3, all the attachments must be saved in IXOS database.
    To meet this requirement, what are the settings we have to do? Please reply if anybody is having idea on this.
    Thanks & Regards,
    Veerappa
    Edited by: Chinna Veerappa on Sep 2, 2011 8:02 AM

    This is not MM specific, you should contact the admin for DMS.
    make your customizing in SPRO >  Cross-Application Components > Document Management  .......
    define your content repository (IXOS) in OAC0 and link the object types to the repository in OAC3
    In the content repository you define to where (IXOS) you store the documents

  • How is the 'import-packages' information saved in the database, and how long?

    Hello,
    I am  developping a ECM Connector for Adobe LiveCycle ES, which is a customized component.
    1 - Who should I contact to have some specific support  ?
    There is no detailed information yet on this on the adobe site  (http://livedocs.adobe.com/livecycle/8.2/programLC/programmer/help/wwhelp/wwhimpl/js/html/w whelp.htm?href=000931.html&accessible=true) .
    If you  think that I should address my problem to another department of Adobe, please  tell me which department?
    I give you another description of my problem. In fact, I have  been investigating on it.
    2 - If I  put this in my component.xml file, in step  1:
    <component-id>com.rsd.adobe.livecycle.RSDFoldersConnector</component-id>
    <version>1.0</version>
    <import-packages><package  version="1.0">com.rsd.simpleApiFolders</package>  </import-packages>
    If I change the  version to 1.1 and remove the  'import-packages' (in step 2) , will the new component need the  com.rsd.simpleApiFolders package. It seems that is still needs it.
    3 - How is the  'import-packages' information saved in the  database, and how  long?
    In  fact, on thursday, I used 'import-packages'  to make a test. And since them, I  can not deploy any of my components.
    LiveCycle throws a  ClassNotFoundException.
    ALC-DSC-000-000: com.adobe.idp.dsc.DSCRuntimeException:  Internal error.
    [java] at  com.adobe.idp.dsc.registry.component.impl.ComponentRegistryImpl$6.doInTransaction(Compone ntRegistryImpl.java:338)
    ... Caused  by: java.lang.ClassNotFoundException: http-0.0.0.0-8080-1Class name  com.rsd.simpleApiFolders.Context from package com.rsd.simpleApiFolders not found.
    [java] at  com.adobe.idp.dsc.DSContainerSearchPolicy.searchClassUsingParentFirst(DSContainerSearchPo licy.java:234)
    Thank you in advance
    Regards.

    1 - Who should I contact to have some specific support  ?
    That would depend on your Adobe support contract and if your organization has a TAM assigned.  You should check with your organization's Adobe contact and see what support options your organization has purchased.
    Having said that, this forum has a few people that may be able to help (but the forum does not have a SLA associated with it)
    2 - If I  put this in my component.xml file, in step  1:
    <component-id>com.rsd.adobe.livecycle.RSDFoldersConnector</component-id>
    <version>1.0</version>
    <import-packages><package  version="1.0">com.rsd.simpleApiFolders</package>  </import-packages>
    If I change the  version to 1.1 and remove the  'import-packages' (in step 2) , will the new component need the  com.rsd.simpleApiFolders package. It seems that is still needs it.If your component class needs the simpleApiFolders class then yes, you still need it.  Think of import-packages like a class-path statement (but with packages and not jars).  Its not physically moving the package into your application, but allowing you to access it from another container.
    3 - How is the  'import-packages' information saved in the  database, and how  long?
    As far as I know they are not imported into the database. As I stated above, I believe that the import-packages just allows you to point to classes that are in the app server's classpath, but are not physically in you component jar file.  As long as that class is in the app server class-path (or in the Adobe EAR file) then you should be able to access it.  Is the jar file containing the simpleApiFolders class in the app server's lib directory?

  • Can Discoverer Reports Saved on the Database be Copied Across Instances

    We are using Discoverer 4i Plus Release - 4.1.48.08.00.
    When workbooks are saved to the database, is there a way of copying them across to another instance (rather than having to re-create them)?
    Thank you,
    Thalita

    Yes. From the file menu, select Export. This starts a wizard which will export the entire EUL, BAs, or individual objects. If you just want to move workbooks, choose Individual Objects, then Workbooks from the drop down.
    To import, fire up admin, connecting to the other database, select Import from tools menu, and the wizard will walk you through.
    A word of caution - if you just export workbooks, they may import without errors into another schema. If the BAs, folder, or items are different between the export schema and the import schema, you will get errors when you try to open the workbooks (you may get errors when you try to import them, too).

  • Is Content stored in the Rich Text Editor saved to the Database?

    Is Content stored in the Rich Text Editor saved to the Database? We are planning a migration from our Dev environment to our QA/Staging environment and would like to migrate our existing content. We were told that content stored in the Rich Text Editor is stored somewhere in the Plumtree database. Is this true? If so, where in the DB (table/field) is it stored?

    Some of the content from Publisher is stored in the file system.
    Look under: plumtree\ptcs\publishedcontent
    there you'll find your preview and published content.

  • Error saving job to database

    Hi,
    In IDES ECC6.0 Ehp 3 (Os: window 2003 64bit    DB: oracle 10.2.0.2) server when iam goto T-Code -- SM36 -- Standard Jobs -- Default Scheduling iam getting below error.
    <error saving job to database>
    So I patched oracle 10.2.0.1 to 10.2.0.4, and kernel patch with latest one.
    But, the same error occured.
    I tried to execute r3trans -d at the OS level,the results is <The system cannot execute the specified program>.
    In SM21, i am getting below error
    <error saving job to database>
    &CAUSE &
    The SAP system was unable to save the current job in the database. This failure suggests that there is a problem with the database system or with the network connections between the SAP application servers and the database system.
    &SYSTEM_RESPONSE&
    Job not saved and not scheduled.
    &What_TO_DO&
    To analyze this problem, start by checking the <DS:TRAN.SM21>system log for message about network or database problems. you can also use the <DS:TRAN.SRZL>computing center management system to check your system for problems. >
    I checked SM28 and SICK and it reports no error.
    Please help how can I schedule the standard jobs

    Make sure you use the proper kernel, for 64bit there are two kernels:
    - one for AMD64 and Intel64
    - one for Itanium-2 64bit
    The R3trans seems to be the wrong one - as I would suggest are the brtools.
    Markus

  • Saving data in database from jsp form

    I have a very huge table in my jsp...600 entries.
    my form table is like this.
    the number of rows depends upon the number of days in a month.
    there is one colum which specifies the time frame in 1 hr frame and
    withing each column is two coulmn representing either male or female.
    If i want to save the data entered in the form to database synchronizing
    with date, timeframe and sex, what is the best way to do it?
    I did it in a way that declaring 600 private string variables in form bean,
    saving it in a list and sending it to database.
    Is there any other way of doing it without the need for 600 getter and setter methods?

    I just want to see if I understood this correctly. You declared 600 private variables in a form bean?
    Perhaps this is not the best use of either Struts or the JavaBean specification. What you almost certainly actually have is a series of homogenous objects. Store that instead in an array or Collection. Use loops to iterate through the values to generate your table. There are both JSTL tags and plain Java code embedded within a JSP to achieve this task.
    - Saish

  • Saving FileName in Database

    Hi,
    I have implemented a Proxy Service from type File on my Project and I want to save the name of the file along with the data in the database.
    My problem is that I don't know how I can manage to save the fileName in DB. I have created WS to save the data in database.
    thanks in advance
    Edited by Getachew at 04/17/2007 8:25 AM

    Hello ghaardt,
    first of all thank you very much for your response!
    What I mean is how can I import the variable 'filename' from SB in my java code in web service. I just want to add it in PersonenControl.requestInsertRow parameters. Look at the folowing jws code.
    import cvstoxml.GechMessageFormatDocument;
    import personContFile.PersonenControl;
    import cvstoxml.GechMessageFormatDocument.GechMessageFormat;
    import cvstoxml.PersonnenDocument.Personnen;
    import cvstoxml.impl.PersonnenDocumentImpl;
    public class PersonWS implements com.bea.jws.WebService
    * @common:control
    private personContFile.PersonenControl PersonenControl;
    static final long serialVersionUID = 1L;
    * @common:operation
    * @jws:conversation phase="none"
    * @jws:parameter-xml schema-element="GechMessageFormat"
    public void requestInsertRows(GechMessageFormatDocument person)
    Personnen[] array = person.getGechMessageFormat().getPersonnenArray();
    for (int i = 0; i < array.length; i++) {
    Personnen personnen = array;
    String name = personnen.getName();
    String ort = personnen.getOrt();
    String vorname = personnen.getVorname();
    String geschlecht = personnen.getGeschlecht();
    PersonenControl.requestInsertRow(name, vorname, ort, geschlecht);

  • How can I convert array of database variant to cluster?

    When I use the Database Connectivity Toolkit to read a recordset from a database, I just use a SQL query.  This returns an array of variant data.  I have always just indexed this array in a sequence structure that has the database variant conversion function in it and build a cluster from that.  There has got to be an easier way, but I can't find it.  Of course, my recordset has various data types in it.  Any ideas?

    Here is the  seed of an idea I had been nocking around.
    Compose an SQL query based on the cluster elements. I chose to use the caption of the cluster elements so that the unbundles have the names I want but the caption can be set to match the collumn names from the table. (If you really want to get fancy, update the captions of the cluster of the typedef before the application opens)
    Do the query and get your array of variants. They should be returned in the order of the query (which we composed based on the cluster order)
    Pass the array of variants into another foor loop that uses the Class ID to do the variant conversion.
    Come to think of it....
    Just wiring the variants to the geneic value refs of the cluster may be good enough.?????
    In theory if "cluster" is a type def, new fileds can be added to tthe typedef and it should get updated from the DB.
    Maybe turn this into a template?
    Your thoughts?
    Ben
    Message Edited by Ben on 01-03-2007 09:02 PM
    Message Edited by Ben on 01-03-2007 09:04 PM
    Message Edited by SarahM on 01-08-2007 12:24 PM
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction
    Attachments:
    Cluster.JPG ‏92 KB

  • Saving array data from a waveform chart

    I am using a CRIO 9004 and a 9237 bridge module to measure some strains from strain gauges. I've got one timed loop that reads the DMA FIFO and puts the arrays of values (16 data points, 4 per channel) into a queue. In the consumer timed  loop a For loop scales the binary data, auto indexes it into arrays, then the arrays are merged into a 2D array for the four channels  displayed on a waveform chart . Everytime the consumer loop runs it indexes 4 data points (per channel) yet the waveform chart plots them in a consecutive manner and doesn't overwrite the previous four. If I convert the arrays to waveform arrays I don't see anything on the waveform chart.
    If I pass the 2D array of data to a array indicator inside or outside the consumer loop I get only 16 data points. I want to save the information that appears on the waveform chart  after the consumer loop but because I'm not using waveform data type I can't use the write waveforms to file vi. The waveform chart history buffer has been set to 195360.
    Idealy we will run the four channels for 120 seconds charting the data and saving the data. The minimum data rate is 1613kS/s (403 per channel) The data can be saved after the loops have finished gathering and processing or while they are running. I noticed when I tried to write to TDMS it slowed the consumer down. Same thing if I use a shift register with the volume of data.
    I suspect I'm not sending data to the chart in the correct manner ( usualy takes two attempts to "clear chart" using shortcut menu).  I'm not too familiar with timed loops /producer consumer loops  and just tried to put something together based on examples.
    I've attached my host vi and front panel screenshot.

    Hope they appear attached this time.
    Attachments:
    Basic DMA (Host).vi ‏444 KB
    screenshot2.jpg ‏113 KB

  • MBAM bitlocker-protected removable drives recovery keys saved on sql database not active directory

    Hi Guys
    I need help in saving bitlocker protected removable drives on the sql database instead of active directory .
    I have tried to play around with the policy and I am not winning , currently my GPO : Choose how bitlocker-protected removable drives can be recovered has only the allow data recovery agent chosen and I have left out all the AD DS option unticked
    Please point me in the right direction on how to achieve this , I want all my keys in a SQL database so the users can recover the keys themselves using the mbam helpdesk website

    Under client management, define your endpoint URLs. You can see the help and the description section for that particular policy. Copy and paste the URL removing the port number and replace the name of the Server with that of your MBAM Web server.
    Also, Disable or don't configure the policy "Choose how bitlocker protected removable Drives can
    be recovered".
    This will save your recovery keys to the MBAM DBs.
    Gaurav Ranjan

  • Saving SecretKey to database

    I need to encrypt user password with a key and store that key in the database along with the encrypted password. Every once in a while I need to generate a new encryption key. So far it works fine with the encryption/decryption routine for 3-4 tests, but every once in a while I get the BadPadding exception and when i look at the key stored in the database I see that the value is a bit different from what was generated. Can anyone please tell me why this might be happening?
    I can post my code for new key generation and storing and retrieving it from the database.
    Here is my method to get the new key that I will use for encryption and then store this key in the database column of varchar2(100) . What should I do different?
    public String genEncryptionKey() {
    try {
    // Step 1.
    // Get an instance of a key generator for DES
    KeyGenerator kgen = KeyGenerator.getInstance("DES" );
    kgen.init(56, new SecureRandom() );
    // Step 2.
    // Generate the key
    SecretKey sKey = kgen.generateKey();
    return new String( sKey.getEncoded());
    catch( Exception e ) {
    e.printStackTrace();
    return null;
    I am then storing this key in the database
    when i do a printlln after this method to see the value of the key and compare it with what i get from the database they are slighlty different
    Thanks

    the problem is that sKey.getEncoded() return an array of bytes and the ascii characters corresponding to this bytes are not "printable" characters.
    If there is a '0' in the array the string will be truncated because '0' mean end of string.
    Convert your byte array in a string using a base 64 encoder (sun.misc.BASE64Encoder)

Maybe you are looking for

  • Suppress BDC success message

    Hello Everyone, I have a kind of problem with running BDC transaction. I donu2019t know how get rid off success status message. I run MD03 transaction. Like this: PERFORM bdc_transaction TABLES messtab USING 'MD03' ctu mode update. Where  CTU is set

  • Mavericks - Clean Install & Copying back Old Software

    Hi I have a late 2008 macbook pro 15" and want to do a clean install on it of mavericks to speed it up I can clone the hard drive with all the software first but can i copy back the some of the purchased software into it MS office and photoshop from

  • GR Slip

    Hi all, How to know what all changes have been made to GR slip? Thanks, Avani.

  • 2 exchange accounts

    I have two different jobs - each job has a MS Outlook e mail account which is on a MS Exchange server account. Is it possible to merge these 2 accounts  - so i can get all my email, contacts, calendar items etc in one place  - ie on my Curve.  thank

  • Mass change of PO text in Material Master

    Hi, 1) Need to find list of materials which has PO text maintained 2) Need to mass change of the PO text view in material master record. Kindly help Vengat