Saving parameters

Hi,
I have simple MVC application. In the jsp that is the view I have a list of books and "delete" and "edit" buttons near each book. When a user clicks on the "delete" button, data about the book is transfered to servlet in session object. Each book is identified by its title (it is like id of the book).
The problem is : I don't know how to identify what book should be deleted - it is always the last book now. Could anyone please how can I solve this? Thank you very much.
Here is the jsp code
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0"
          xmlns:c="http://java.sun.com/jsp/jstl/core">
<jsp:directive.page
  language="java"
  contentType="text/html; charset=ISO-8859-1"
  pageEncoding="ISO-8859-1"
  session="true"/>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
<title>Books in the library</title>
</head>
<body>
<form name="ListBookForm" action="BookServlet" method="POST">
<table border = "0">
<tr>
<td><b>Book title</b></td>
<td><b>Author</b></td>
<td><b>ISBN</b></td>
<td><b>url</b></td>
</tr>
<c:forEach items="${booklist}" var="book" varStatus="status">
<tr>
<td><c:out value="${book.title}" /></td>
<td><c:out value="${book.author}" /></td>
<td><c:out value="${book.ISBN}" /></td>
<td><c:out value="${book.url}" /></td>
<c:set value="${book.title}" var="title" scope="session"/>
<c:set value="${book.author}" var="author" scope="session"/>
<c:set value="${book.ISBN}" var="ISBN" scope="session"/>
<c:set value="${book.url}" var="url" scope="session"/>
<td><input name="editBook" type="submit" value="editBook"/></td>
<td><input name="deleteBook" type="submit" value="deleteBook"/></td>
</tr>
</c:forEach>
</table>
<input name="createBook" type="submit" value="createBook" />
</form>
</body>
</html>
</jsp:root>

Rem22 wrote:
it is always the last book now. Indeed, inside the c:forEach you're overwriting the c:set values everytime, until the last book.
Could anyone please how can I solve this? There are several ways. Easiest way is to put each book in its own <form> and put the ID in a hidden input element. If you want a single form, you'll have to add some Javascript to change the ID in the hidden input element depending on the button clicked.

Similar Messages

  • Saving parameters entered in a gui dialog to be used in the main panel

    Hi,
    I'm having a nightmare at the moment.
    I've finished creating a program for my final year project, that is all comand line at the moment.
    i'm required to design a GUI for this. i've started already and have a main panel that has a few buttons one of which is a setParameters button. which opens up a file dialog that allows the user to enter parameters that will be used by the main panel later on.
    I'm having trouble imagining how these parameters will be accessed by the main Panel once they are saved.
    At the moment, without the GUI i have get and set methods in my main program which works fine. Is this the kind of thing i'll be using for this?
    my code for the parameters dialog
    public class Parameters  extends JDialog
         private GridLayout grid1, grid2, grid3;
         JButton ok, cancel;
            public Parameters()
                    setTitle( "Parameters" );
                    setSize( 400,500 );
                    setDefaultCloseOperation( DISPOSE_ON_CLOSE );
              grid1 = new GridLayout(7,2);
              grid2 = new GridLayout(1,2);
                    JPanel topPanel = new JPanel();
                    topPanel.setLayout(grid1);
              JPanel buttonPanel = new JPanel();
                    buttonPanel.setLayout(grid2);
              ok = new JButton("OK");
                  ok.addActionListener(new ActionListener() {
                  public void actionPerformed(ActionEvent e) {
                  //when pressed i want to save the parameters that the user has entered
              //and be able to access these in the RunPanel class
              cancel = new JButton("Cancel");
                 cancel.addActionListener(new ActionListener() {
                          public void actionPerformed(ActionEvent e) {
                        //when pressed just want the Jdialog  to close
              buttonPanel.add(ok);
              buttonPanel.add(cancel);
              JTextArea affinityThresholdScalar = new JTextArea();
              JTextArea clonalRate = new JTextArea();
              JTextArea stimulationValue = new JTextArea();
              JTextArea totalResources = new JTextArea();
              JLabel aTSLabel = new JLabel("affinityThresholdScalar");
              JLabel cRLabel = new JLabel("clonalRate");
              topPanel.add(aTSLabel);
              topPanel.add(affinityThresholdScalar);
              topPanel.add(cRLabel);
              topPanel.add(clonalRate);
                    Container container = getContentPane();//.add( topPanel );
              container.add( topPanel, BorderLayout.CENTER );
              container.add( buttonPanel, BorderLayout.SOUTH );
         }the main panel class is:
    public class RunPanel extends JPanel implements ActionListener
         JButton openButton, setParametersButton, saveButton;
         static private final String newline = "\n";
         JTextArea log;
             JFileChooser fc;
         Data d = new Data();
         Normalise rf = new Normalise();
         Parameters param = new Parameters();
        public RunPanel()
            super(new BorderLayout());
            log = new JTextArea(5,20);
            log.setMargin(new Insets(5,5,5,5));
            log.setEditable(false);
            JScrollPane logScrollPane = new JScrollPane(log);
            fc = new JFileChooser();
            openButton = new JButton("Open a File...")
            openButton.addActionListener(this);
         setParametersButton = new JButton("Set User Parameters");
            setParametersButton.addActionListener(this);
         saveButton = new JButton("save");
            saveButton.addActionListener(this);
            JPanel buttonPanel = new JPanel(); //use FlowLayout
            buttonPanel.add(openButton);
         buttonPanel.add(setParametersButton);
         JPanel savePanel = new JPanel();
         savePanel.add(saveButton);
            add(buttonPanel, BorderLayout.PAGE_START);
            add(logScrollPane, BorderLayout.CENTER);
         add(savePanel, BorderLayout.SOUTH);
        public void actionPerformed(ActionEvent e) {
            if (e.getSource() == openButton) {
                int returnVal = fc.showOpenDialog(RunPanel.this);
                if (returnVal == JFileChooser.APPROVE_OPTION) {
                    File file = fc.getSelectedFile();
                    log.append("Opening: " + file.getName() + "." + newline);
              Vector data = d.readFile(file);
              log.append("Reading file into Vector " +data+ "." + newline);
              Vector dataNormalised = rf.normalise(data);
             else {
                    log.append("Open command cancelled by user." + newline);
                log.setCaretPosition(log.getDocument().getLength());
         else if (e.getSource() == saveButton) {
                int returnVal = fc.showSaveDialog(RunPanel.this);
                if (returnVal == JFileChooser.APPROVE_OPTION) {
                    File file = fc.getSelectedFile();
                    log.append("Saving: " + file.getName() + "." + newline);
                } else {
                    log.append("Save command cancelled by user." + newline);
                log.setCaretPosition(log.getDocument().getLength());
         else
              if (e.getSource() == setParametersButton)
                    log.append("loser." + newline);
                          param.show();
        private static void createAndShowGUI() {
            JFrame.setDefaultLookAndFeelDecorated(true);
            JDialog.setDefaultLookAndFeelDecorated(true);
            JFrame frame = new JFrame("AIRS");
            frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            JComponent newContentPane = new RunPanel();
            newContentPane.setOpaque(true);
            frame.setContentPane(newContentPane);
            frame.pack();
            frame.setVisible(true);
        public static void main(String[] args) {
            javax.swing.SwingUtilities.invokeLater(new Runnable() {
                public void run() {
                    createAndShowGUI();
    }Can anybody offer any suggestions?
    Cheers

    What you need is my ParamDialog. I think it could be perfect for this sort of thing. There are a few references in it to some of my other classes namely
    StandardDialog. Which you can find by searching for other posts on this forum. But if you'd rather not find that you could just use JDialog instead
    WindowUtils.visualize() this is just a helper method for getting things visualized on the screen. You can just use setBounds and setVisible and you'll be fine.
    You are welcome to use and modify this code but please don't change the package or take credit for it as your own work.
    If you need to bring up a filedialog or a color chooser you will need to make some modifications. If you do this, would you mind posting that when you are done so that myself and others can use it? :)
    StandardDialog.java
    ================
    package tjacobs.ui;
    import java.awt.Dialog;
    import java.awt.Frame;
    import java.awt.GraphicsConfiguration;
    import java.awt.HeadlessException;
    import javax.swing.JFrame;
    import javax.swing.JLabel;
    import javax.swing.JPanel;
    import javax.swing.JPasswordField;
    import javax.swing.JTextField;
    import java.awt.*;
    import java.util.HashMap;
    import java.util.Properties;
    /** Usage:
    * *      ParamDialog pd = new ParamDialog(new String[] {"A", "B", "C"});
    * pd.pack();
    * pd.setVisible(true);
    * Properties p = pd.getProperties();
    public class ParamDialog extends StandardDialog {
         public static final String SECRET = "(SECRET)";
         String[] fields;
         HashMap<String, JTextField> mValues = new HashMap<String, JTextField>();
         public ParamDialog(String[] fields) throws HeadlessException {
              this(null, fields);
         public ParamDialog(JFrame owner, String[] fields) {
              super(owner);
              setModal(true);
              this.fields = fields;
              JPanel main = new JPanel();
              main.setLayout(new GridLayout(fields.length, 1));
              for (int i = 0; i < fields.length; i++) {
                   JPanel con = new JPanel(new FlowLayout());
                   main.add(con);
                   JTextField tf;
                   if (fields.endsWith(SECRET)) {
                        con.add(new JLabel(fields[i].substring(0, fields[i].length() - SECRET.length())));
                        tf = new JPasswordField();
                   else {
                        con.add(new JLabel(fields[i]));
                        tf = new JTextField();
                   tf.setColumns(12);
                   con.add(tf);
                   mValues.put(fields[i], tf);
              this.setMainContent(main);
         public boolean showApplyButton() {
              return false;
         public void apply() {
         private boolean mCancel = false;
         public void cancel() {
              mCancel = true;
              super.cancel();
         public Properties getProperties() {
              if (mCancel) return null;
              Properties p = new Properties();
              for (int i = 0; i < fields.length; i++) {
                   p.put(fields[i], mValues.get(fields[i]).getText());
              return p;
         public static void main (String[] args) {
              ParamDialog pd = new ParamDialog(new String[] {"A", "B", "C"});
              WindowUtilities.visualize(pd);     
         public static Properties getProperties(String[] fields) {
              ParamDialog pd = new ParamDialog(fields);
              WindowUtilities.visualize(pd);
              return pd.getProperties();          

  • How to retrieve the saved parameters simply?

    Hi all,
    I'm programming for my machine with LabView. The machine has motorized stages. Each stage has quite a few positions (parameters), which needs to be saved in hard-disk. It's like non-volatile registers. When my program is running, from time to time, these parameters needs to be loaded or overwritten. Is there a quick and simple way to implement this?
    Originally I was thinking the Global variables can solve this, but it turns out once I shut down the program, the value stored in the global variable gets reset. So global variable can't do this job.
    Of course I can store all these values in a spreadsheet and write a sub-routine to parse the data inside this spreadsheet. But this will be pain of the neck since there are quite a few parameters. I'm wondering whether there is simpler solution.

    You can develop you idea of using a global variable : save all the controls in a single operation.
    How to do that ? Get the references to all controls on the global FP, then read and save all the corresponding values. This is a comfortable solution since you don't have to bother on the number/type of controls.
    Of course, the reverse operations restore the saved values.
    See the attached example.
    CC
    Chilly Charly    (aka CC)
             E-List Master - Kudos glutton - Press the yellow button on the left...        
    Attachments:
    Read_Save Global.vi.zip ‏19 KB

  • Best practice for saving and recalling objects from disk?

    I've been using the OOP features of LabVIEW for various projects lately and one thing that I struggle with is a clean method to save and recall objects.
    Most of my design schemes have consisted of a commanding objects which holds a collection of worker objects.  Its a pretty simple model, but seems to work for some design problems.  The commander and my interface talk to each other and the commander sends orders to his minions in order to get things done.  For example, one parrent class might be called "Data Device Collection" and it has a property that is an array of "Data Device" objects.
    The Data Device object is a parent class and its children consist of various data devices such as "DAQmx Device", "O-Scope Device", "RS-232 Device", etc.
    When it comes to saving and loading data, the commanding class's "Save" or "Load" routine is called and at that time all of the minions' settings are saved or recalled from disk.
    My save routine is more-or-less straight forward, although it still requires an overwriting "Save" and "Load" vi.  Here is an example:
    It isn't too bad in that it is pretty straight forward and simple and there also would be no changes to this if the data structure of the class changed at all.  It also can save more generalized settings from it's parrent's class which is also a good feature.  What I don't like is that it looks essentially the same for each child class, but I'm at a loss on an effective way to move the handling of the save routing into the parent class.
    The load routine is more problematic for me.  Here is an example:
    Again, the desirability of moving this into the parent class would be awesome.  But the biggest complaint here is that I can't maintain my dynamic dispatch input-output requirements because the object that I load is strictly typed.  Instead I have to rely on reading the information from the loaded object and then writing that information to the object that exists on the dynamic dispatch wire.  I also dislike that unlike my Save Routine, I will need to modify this VI if my data structure of my object changes.
    Anyway, any input and insight would be great.  I'm really tired of writing these same VIs over-and-over-and-over again, and am after a better way to take care of this in the parent class by keeping the code generalized but still maintain the ability to bring back the saved parameters of each of the children classes.
    Thanks for your time.

    I'm with Ben. Don't rely on the current ability to serialize an object. Create a save method and implement some form of data persistence there. If you modify your class you might be disappointed when you cannot load objects you previously saved. It mostly works but as soon as you reset the version information in the class, you can no longer load the old objects. This is fine if you know how to avoid resetting the history. One thing that will do this is if you move the class into or out of a library. It becomes a new class with version 1.0.0 and it no longer recognizes the old objects.
    [Edit:  I see that you are just writing to a binary file. I'm not sure you can load older objects anyway using that method but I have never tried it.]
    This will not help you right now but there are plans for a nice robust API for saving objects.
    =====================
    LabVIEW 2012

  • Save parameters in a file with a predefined extension

    Hello everyone!
    I've create a VI which is saving parameters listed in a table. The saved file has *.zpw extension.
    It's working perfectly (please see attached VI)  but I want it to be more "professional".
    I mean, I'd like to present to the user a friendlier interface ( "Tab Control" ) so that he shouldn't scroll down the table to enter the values of the parameters.
    I've been thinking and trying many ideas but unsuccessfully. 
    I'd be grateful if somebody could give me some ideas
    Best regards
    Kabanga
    Attachments:
    Save a table of parameters.vi ‏41 KB

    hello,
     things like that :
    Message Edité par tinnitus le 03-13-2008 01:32 PM
    CLAD / Labview 2011, Win Xp
    Mission d'une semaine- à plusieurs mois laissez moi un MP...
    RP et Midi-pyrénées .Km+++ si possibilité de télétravail
    Kudos always accepted / Les petits clicks jaunes sont toujours appréciés
    Don't forget to valid a good answer / pensez à valider une réponse correcte
    Attachments:
    Save a table of parametersb.vi ‏45 KB

  • Why sever-side state saving doesn't support fail over?

    Hi all,
    In my previous thread "ADF server-side state saving method" Frank said that it doesn't support fail over.
    Re: ADF server-side state saving method
    My customer is wondering the reason.
    If anyone has a clear statement about it, could you share it?
    Any help will be much appreciated.
    Atsushi

    Timo,
    As I wrote in my previous thread, my customer adopted multi-windows application design because they didn't know it caused viewExpiredException frequently.
    Now I'm looking for the best setting for avoiding the exception and need ADF guru's help.
    Frank said that ADF is on Sun's RI. And it seems that the state-saving parameters of Mojarra are working correctly in my environment. However any ADF docs don't mention the behavior of server-side state saving clearly. When I set state-saving method "server", view states are managed per logical view (≒ window). And it seems better for multi-window application than using client-token based state management from the perspective of preventing viewExpiredException.
    Because fail over is not their requirement, if we could make sure that server-side state saving doesn't have other side-effects they might adopt it.
    So I'd like to know in more detail about the behavior.
    Thanks,
    Atsushi

  • Excel file attach problem

    Looking for advice!
    I created an POI HSSFWorkbook object.
    When I'm writing in a file the structure shows as correct.
    When I create a file and then subsequently attach to mail the file comes arrives as right.
    If I do a direct attachment of the HSSFWorkbook object ( spring ) upon saving,
    it turns out to be of the wrong structure and illegible after saving.
    parameters : name- "file.xls",
    dataSource - HSSFWorkbook.getBytes(),
    contentType - "application/zip"
    ByteArrayResource res = new ByteArrayResource(dataSource) ;
    this.helper.addAttachment( fileName, res, contentType ) ;     
    what's wrong ?

    O, I'm very sorry. I made a mistake.
    It must be there setContentType( "application/vnd.ms-excel" ) .
    I want attach workbook.getBytes[] data to mail object,
    and does not turn out without the record of file on a disk.
    Are there ideas ?
    Thank you .

  • MainStage 1.0.1 released

    via software update!
    MainStage 1.0.1 contains several updates, including:
    Improves stability
    Addresses minor usability issues
    Adds options for saving parameter values when switching patches
    This software is recommended for all users of MainStage 1.0.
    For more information about this release, go to: Late Breaking News

    Option for saving parameters is exactly what I need.
    Bravo!
    Still wondering why it's not possible to use buffer 32 with MotU although it's possible with Logic with the same channel strips.
    Using the new safety buffer helps though.

  • Flash Audio Bug

    Flash Player has clicking audio when the mouse is moved when viewing using Internet Explorer version 8.0.6001.18702. This started after installing Flash 11.3.300.270 and 271. My previous version did not do this but I have no idea what that version was and I have no way back. The reason I upgraded was because I had videos that would not start. You forced it by not responding to that problem. I have now circulated in your unhelpful "help area" and have done everything there including deleating flash folders and saved parameters in the control panel. Nothing touches this annoying problem. So am I wasting my time here dealing with this monopoly or is there actually someone concerned with quality assurance.

    I understand the frustration.  If you believe you've run into a problem and would like to simply go back to a previous version (I'd suggest the last 10.3 version for you) please see this FAQ:
    How do I revert to a previous version of Flash Player?

  • Set value for textarea field in tabular report

    Hi all,
    I need some help setting textarea values in a tabular report. The tabular report is for users to be able to build their own ad hoc report, by specifying which columns should be included and filtered. Here are the example tables:
    -- Table that holds all of the data for the report.
    create table vehicle (
      make varchar2(50),
      model varchar2(50),
      type varchar2(50),
      year number);
    insert into vehicle values ('Toyota','Camry','Sedan','2008');
    insert into vehicle values ('Toyota','4Runner','SUV','2008');
    insert into vehicle values ('Honda','Civic','Compact','2011');
    insert into vehicle values ('Honda','Accord','Sedan','2010');
    insert into vehicle values ('Ford','F150','Truck','2011');
    -- Table that holds the columns that are available to be filtered in report.
    create table vehicle_cols (
      col_id varchar2(50),
      col_label varchar2(50));
    insert into vehicle_cols values ('make','Vehicle Make');
    insert into vehicle_cols values ('model','Vehicle Model');
    insert into vehicle_cols values ('type','Vehicle Type');
    insert into vehicle_cols values ('year','Vehicle Year');
    -- Table that holds filters saved by user.
    create table vehicle_user_saved (
      saved_rpt_name varchar2(50),
      col_id varchar2(50),
      col_value varchar2(50));
    insert into vehicle_user_saved values ('Saved Report One','make','Toyota');
    insert into vehicle_user_saved values ('Saved Report One','make','Honda');
    insert into vehicle_user_saved values ('Saved Report One','model','Sedan');
    insert into vehicle_user_saved values ('Saved Report Two','make','Honda');
    insert into vehicle_user_saved values ('Saved Report Two','year',2010);And below is the source query for the region. The textarea value is initially set to null.
    -- Region Source for specifying query parameters.
    select
      col_label,
      apex_item.checkbox(1,'#ROWNUM#','CHECKED') as include_cols,
      apex_item.hidden(2,col_id)
      || apex_item.textarea(3,null,2,100) as filter_cols
    from
      vehicle_cols;When a user clicks the button to load the parameters for a report they have previously saved, I'd like to change the values in the textarea field from null to the saved values from the vehicle_user_saved table so the user can see the parameters and run the report, or modify the parameters if necessary.
    I thought I could run a PL/SQL process (After Footer) when the button is clicked to populate these textarea fields, but the test below doesn't do anything:
    begin
      apex_application.g_f03(1) := 'Hello';
    end;For example, when a user selects to load "Saved Report One," the following parameters should be loaded into the textarea fields:
    Column >> Filtered Columns
    Vehicle Make >> Honda, Toyota
    Vehicle Model >> Sedan
    Vehicle Year >> Null
    Vehicle Type >> NullCan someone help me out? I wouldn't think I need Ajax for this since it's ok to be processed after the button click. But if I do need to use Ajax, I definitely could use some help with it, as I've never used Ajax before. I've setup this example in my hosted account to help.
    Site: http://apex.oracle.com
    Workspace: MYHOSTACCT
    Username: DEVUSER1
    Password: MYDEVACCT
    Application: report parameters
    Thanks in advance!
    Mark
    APEX 4.1, Oracle 11g

    Hi, thanks for your response.
    I'm not adding any new rows, I'm just trying to change the values of the textarea fields in the tabular report when the user chooses to load his/her saved parameters. The default for the textarea field in all rows is null, because I assume users will want to start building the report from scratch. However, when the user clicks the button to load his/her saved values, I want to overwrite the null values with new values. How can I do that?
    Thanks,
    Mark

  • Save an input mask as variant for a method of a Z class

    Hi all,
    quite a dumb question, but I switched to OO abap recently and can't find this feature...
    When I'm creating a custom function module, I can test in debug simply lauching it and saving parameters of the input mask iin a Variant, so that I can try the run with these params whenever I want simply loading the variant I saved.
    Now... I'm working on a method in a custom class; I'd like to test but everytime I have to populate the parameter mask since I can't find a "save variant" option. Is there any way to accomplish this? Thanks in advance.

    Could write an ABAP UNIT class and definition and perform ABAP UNIT test on the object...ABAP Unit is regression testing for programmers but I do development testing with the tool.

  • Trex queue status - to be synchronized

    Hello All,
    We have upgraded our portal to EP6 SP12 and also Trex to SP12. I have created two indexes, one for searching the documents folder and other for Who's Who Iview(ume). The status of the queues is still "to be synchronized". Previously the status was "to be transmitted" and after I flushed it, the status got changed to be synchronized. From here the status is not changing.
           What is that I missed out that caused this problem. Kindly suggest me as how I can correct this problem and change the status to Ok.
    Thanks,
    Maya

    I am using TREX 6.1 on a single portal instance.
    After creating an index. The prcessing seemed to get stuck in different statuses. 
    I resolved this issue by making some system adjustments to parameters.  I went into system administration>monitoring>knowledge management>index monitoring
    I double clicked on the index I was having issues with.  Next, I went into 'edit queue parameters'.  I adjusted the schedule time to run ALL-0:05.  Tranmit bulk size = to the # of documents i am indexing, Initial indexing mode=on, replicate after synchronize=off.  I saved parameters, backed out, and refresh monitoring after waiting five mins (ALL-0:05).  This seemed to push everything through.  I will adjust setting after I continue testing and create larger indexes.  Hope this helps someone.  If so, rewaard with points.  Have a great day
    Sasha
    Message was edited by: Sasha Valentine
    Message was edited by: Sasha Valentine
    Message was edited by: Sasha Valentine

  • Razr Maxx call feature battery drain

    Folks,
    I have been seeing/having this issue that I am getting a bit frustrated with and wondering if I am the only one seeing this. When using the device the phone can hold a charge very well, that is unless I use the phone as a phone. I can use the display for 40 minutes on the internet and whatnot but a 10 minute phone call consumes more power according to the battery management app. I have gone through a few Razr Maxxs thinking that I had this was an issue with the hardware. I have called Moto regarding this and they are unable to figure out what the issue could be.
    Am I the only person who is seeing this issue? For a phone that claims 21 hours in best conditions I find it hard to believe that an hour of call time drains almost 10% of the battery's charge.

    Your using more battery because your using the full power of that Transmitter to hit the Tower an you may be jumping from 4G to 3G when doing so an if this happening while your traveling your bouncing from Tower to Tower.. An if this is the case it can pull more from that phone an you said this is your second or third one an it's showing the same results. I would say keep what you got an give the one you got a chance.. batteries on phones do better after a few charge an discharge Cycles.
    An one other thing that Maxx has some of the Best battery saving parameters there are on a phone. One i use when at home is my Wi-Fi an if your not using any of features, like Bluetooth,Wi-Fi, G.P.S Etc. while on the phone shut'em off. If your running any live Wallpapers go back to non live wallpapers an if your Display is set high adjust it to a lower Setting an un-check Auto Adjust an i even un-checked All animations. An one other thing to check your Apps some Apps can be battery hogs an while your Talking they can still be running in the background an consuming power.!

  • Oracle Apex Hosted Account

    Hello, all,
    Does anyone know if the Oracle-provided environment for ApEx times out after a certain number of days? I was working in the environment today, left it and when I tried to go back in, my credentials wouldn't work. Or is there some other reason for the credentials not to work (a down server, for example)
    ThX!

    Hi, thanks for your response.
    I'm not adding any new rows, I'm just trying to change the values of the textarea fields in the tabular report when the user chooses to load his/her saved parameters. The default for the textarea field in all rows is null, because I assume users will want to start building the report from scratch. However, when the user clicks the button to load his/her saved values, I want to overwrite the null values with new values. How can I do that?
    Thanks,
    Mark

  • Error found while saving. System.Data.OleDb.OleDbException (0x80040E10): No value given for one or more required parameters.

    Hello Friends
    I am facing problem while saving the data into the ms access 2007.
    Below picture shows my database and table
    Below picture shows my error log.
    Here is my GettingCategoryId() method code.
    private OleDbCommand GettingCategoryId()
    OleDbCommand cmd2 = new OleDbCommand("select * from tbl_category where category_name='" + combobox_category_name.Text + "' ", GlobalVarClass.globalCon);
    OleDbDataReader dr = cmd.ExecuteReader();
    while (dr.Read())
    textBox1.Text = Convert.ToString(dr.GetInt32(0));
    return cmd2;
    Here is my conv_photo() method code.
    void conv_photo()
    //converting photo to binary data
    if (pictureBox1.Image != null)
    ms = new MemoryStream();
    pictureBox1.Image.Save(ms, ImageFormat.Jpeg);
    byte[] photo_aray = new byte[ms.Length];
    ms.Position = 0;
    ms.Read(photo_aray, 0, photo_aray.Length);
    cmd.Parameters.AddWithValue("@item_image", photo_aray);
    Here is my connection string.
    public static string gloabal_connection_string = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source= " + Application.StartupPath + "\\pos_fircos.accdb";
    public static OleDbConnection globalCon = new OleDbConnection(gloabal_connection_string);
    This is my saving code.
    OleDbCommand cmd = GettingCategoryId();
    cmd = new OleDbCommand("INSERT INTO tbl_items(category_id,item_no,item_model,item_description,item_sale_price,item_image)Values('" + Convert.ToInt32(textBox1.Text) + "','" + Convert.ToString(textbox_item_no.Text) + "','" + Convert.ToString(textbox_item_model.Text) + "','" + Convert.ToString(textbox_item_description.Text) + "','" + Convert.ToDouble(textbox_item_sale_price.Text) + "',@item_image)", GlobalVarClass.globalCon);
    conv_photo();
    cmd.ExecuteNonQuery();
    Please give me solution this problem.
    Waiting for your reply.
    Thanks and regards
    Your truly,
    Hasnain Ahmad
    [email protected]

    I strongly recommend that you change your command from using string formatting to build up the command to a simple command that uses parameters.  This will: a) clean up your code so it is understandable, b) prevent SQL injection attacks which your current
    code is fully vulnerable to, c) help more easily identify which parameter you aren't actually setting.
    //Not validated against the compiler so there may be syntax errors
    var cmd = new OleDbCommand("INSERT INTO tbl_items(category_id,item_no,item_model,item_description,item_sale_price,item_image) Values (@categoryId, @itemNo, @itemModel, @itemDescription, @itemPrice, @itemImage)", GlobalVarClass.globalCon);
    cmd.Parameters.AddWithValue("@categoryId", Convert.ToInt32(textBox1.Text));
    cmd.Parameters.AddWithValue("@itemNo", textbox_item_no.Text);
    cmd.Parameters.AddWithValue("@itemModel", textbox_item_model.Text);
    cmd.Parameters.AddWithValue("@itemDescription", textbox_item_description.Text);
    cmd.Parameters.AddWithValue("@itemPrice", Convert.ToDouble(textbox_item_sale_price.Text));
    //This is the parameter that doesn't seem to have any value so replace ?? with the variable holding the value of the image
    cmd.Parameters.AddWithValue("@itemImage", ??);
    conv_photo();
    cmd.ExecuteNonQuery();
    Michael Taylor
    http://blogs.msmvps.com/p3net

Maybe you are looking for

  • Safari 5 Won't Open

    I'm using Firefox to post. I think I know what's wrong with Safari v.5, but not how to fix it. I played around with the Preferences today (I'm not sure what I did exactly). After that, it now loads ALL my Bookmarks as tabs. I have 1,915 of them, nest

  • Pictures display in photos but some don't display individually

    All my pictures are displayed when I open Iphoto and click onthe Photos library. When I try to look an individual picture  it flashes on the screen and then it is grayed out with a bug ?..

  • Used tx setup

    I have purchased a used Palm tx.  I'm having trouble setting it up.  I need to change the user name of the TX.  How do you do that?  I downloaded the software from the Palm site and installed but the tx won't sync.  Ideas?? Post relates to: Palm TX

  • Featured Product Styling

    I am looking to use custom CSS to style my featured products tags so that they don't display in a list vertically, but instead horizontally in columns and maybe add some colors and nicer fonts, ect. But I have never applied CSS to Taged product lists

  • Why is it asking my mom and brother for my itunes account password when they have and are logged in their own account?

    When my mom and brother go to update their apps, it askes for my password for my itunes account. Yet they have their own accounts and they're signed into them for iCloud and for purchasing apps. It doesn't make sense to me and it was out of nowhere..