Problems with INSERT  syntax ?

Dear programmers,
I am have a problem with INSERT Syntax,
I have a table with 11 fields out of which one is auto_increment field(id), Now my problem is, Do i need to specifiy autoincrement field in INSERT statement. I dont thinks ?
My Insert statement is as follows ,
int result = st.executeUpdate("insert into tablename"
          +"(name, user_group, lage, preis, anmerkung, exp_uri, timestamp, nummer)"
          +"values +Objekt+"','"+Kategoriekey+"','"+Lage+"','"+Preis+"','"+Anmerkung+"','"+Dateiname+"','"+date.getTime()+"','"+ObjektID+"')");
thanks in advance
bye

The answer to your question is maybe. Each database handles autoincrements differently. What database are you using?
I also noticed that you are doing an insert using the standard Statement. You should look into using PreparedStatements for performance reasons and issues such as single quotes from within a string.
Matt

Similar Messages

  • Problems with inserting elements into vectors

    Hi,
    I have a problem with the setElementAt() method for vectors.
    I want to initialise a vector that is same size as a previous vector declared in my program and insert float 0.0 in all the positions.
    The code below is a for loop to do just this where count is the size of the previous vector.
    for(int i=0;i<count; i++)
                   vLargest.setElementAt(zero,i);
              }i have declared zero as a float
    float zero = 0.0f;
    the error that i'm getting is that it that the vector cannot be applied to a float.
    Can anybody tell me what i'm doing wrong?
    Thanks

    Yes you need to store Objects in your Vector not primitives.
    float is not an Object it is a primitive. But Float is an object.

  • A problem with inserting into DB hebrew strings

    Hi,
    I am working with a 8.1.7 DB version, and use thin driver.
    I have my DB Charest configured to iso 8859P8 (which is visual Hebrew)
    I have no problem in making a connection and retrieving strings, using SELECT * FROM ..
    and then use the ResultSet.getString(String columnName) method .
    I also have no problem in inserting the Hebrew characters , and retrieving them back ( I represent them in a servlet ),
    The only problem I do have, is when I try to insert into DB a row in the following manner
    INSERT into table_name values( Hebrew_String_value1, Hebrew_String_value2, Hebrew_String_value3, Hebrew_String_value4)
    the insertion works fine , but somehow the insertion misplaces the strings order and actually the insertion is in opposite order :
    Hebrew_String_value4, Hebrew_String_value3, Hebrew_String_value2, Hebrew_String_value1.
    If I use the same insert with English Strings , there is no problem.
    does any one have the solution how I insert the strings in the right order ?
    one solution I have is to insert only one column and then update the table for each column , but then , instead of one execute() action , I have to make ,
    1 execute() + 9 executeUpdate() for a 10 column table

    Can you try specify the column order in your INSERT statement, i.e.
    INSERT INTO mytable( column1_name,
                         column2_name,
                         column3_name,
                         column4_name )
                 VALUES( column1_string,
                         column2_string,
                         column3_string,
                         column4_string)My wild guess, though I can't understand why at the moment, is that there may be a problem because Hebrew is read from right to left, that may be causing a problem.
    Justin
    Distributed Database Consulting, Inc.
    http://www.ddbcinc.com/askDDBC

  • I'm having a problem with inserting a photo gallery created with Bridge

    I sure could use some help.
    Adobe Bridge - Why do I have a white bar on my page?
    I am using windows vista, Dreamweaver cs4 and Adobe bridge to insert a photo gallery.
    I am using an I-frame to embed a photo gallery that was created with Adobe Bridge CS4. Adobe Bridge instructed me to make the i-frame height = 75% of the width. The code is <iframe src="PhotoAlbum/index.html" width="900" height="675" frameborder="0"></iframe>
    my css places the album in #photoalbum.
    #photoAlbum contains the i-frame with the following properties:
    #photoAlbum {
    margin-top: 20px;
    margin-right: auto;
    margin-bottom: 0px;
    margin-left: auto;
    width: 900px;
    text-align: center;
    padding-top: 20px;
    padding-bottom: 20px;
    border-top-width: 2px;
    border-top-style: groove;
    border-top-color: #333;
    I tried changing the width to 960, 900, 850 etc with no success.
    I have tried making the background of #photoAlbum black with no success.
    The link to the photo album is http://www.gigharborrealestate.com/smith/PhotoAlbum/index.html and shows no white bar.
    The site that I am having problems with is http://www.gigharborrealestate.com/smith On the right side of the Point Richmond Photo Gallery is a white vertical bar.  If you go to /PhotoAlbum/index.html there is no white bar.
    Why does this bar show up when /PhotoAlbum/index.html is put into an I-frame? How can I get rid of the vertical bar?

    insert the following into your code,
    scrolling="no"
    it should look like this
    <div id="gallery"><iframe src="IMAGES/Adobe Web Gallery/index.html"  scrolling="no" width="730" height="555" frameborder="0" name="web_gallery" style="background-color: #D8D9B4"></iframe></div>
    hope it helps, good luck

  • Problem with inserting date

    Hi,
    I have a JSP form that takes the date and inserts it into the db. I'm having a problem with what format the date should be in. My insert string looks like
    INSERT INTO users (USERNAME, WHO_CREATED, WHEN_CREATED) VALUES ('bob', 'jeff', (Result.getString("sysdate"))
    unfortunatly whatever format I put the date in I can't seem to make both JAVA and ORACLE happy.
    I'm new at this so I'm hoping that is something simple.
    Thanks,
    Chris
    null

    Hi Chris,
    Are u using Business components for java i.e. entity/view objects? If yes, then the default date format for entity/ view objects is
    "yyyy-mm-dd".
    Aparna.

  • Keyboard problems with insert button

    Hi, I'm having problems wih the insert button. It doesnt work when i press to activate it. However, this button is also used with the function key to toggle scroll lock which works. What is the problem? Is my labtop defective? I also have this problem with my desktop keyboard. Is it some kinda setting that I disabled because it worked on my desktop keyboard a few days ago and I don't remember setting any different preferences.
    My labtop is the the U550. It is 2 days old.

    Quote from: mild0d on 21-July-12, 03:01:44
    Has anyone had any problems with their keyboard? I bought a gt60 back in april. Everthing with the laptop has been great except for the "W" key. It works fine typeing but in a game and trying to go forward it will stop working and I will have to repress. I also noticed that if I have just used the keyboard and stop using it for a minute it will make this crackling sound. It has freaked me out a couple times.
    Regardless, if it was any other key I would have had no problem but it is pretty much my main gaming key. I RMA'ed through msi and sent it off tuesday. Had anyone had any experience with MSI laptop rma service?   I am just wanting to know what type of turn around time i will have?
    Having the exact same issue with my GT60  :-(

  • Problems with inserted datagridview checkbox column

    I have a few problems with a checkbox column added to a datagridview. The datagridview is bound by a binding source whose datasource is a datatable. I also add in the code a checkbox column:
    private
    void InitializeDataGridView()
                dgvInvoices.ColumnHeadersDefaultCellStyle.Font =
    new Font("Arial", 10,
    FontStyle.Bold);
    DataGridViewCheckBoxColumn chkColumn =
    new DataGridViewCheckBoxColumn();
                chkColumn.FlatStyle =
    FlatStyle.Standard;
                dgvInvoices.Columns.Insert(0, chkColumn);
                dgvInvoices.DataSource = bs;
                cmbInvoicingCriteria.Text =
    "(All)";
    DataGridViewBinding.CreateColumn(dgvInvoices,
    "Date", "Date",
    DataGridViewContentAlignment.MiddleLeft);
    DataGridViewBinding.CreateColumn(dgvInvoices,
    "Invoice", "Invoice",
    DataGridViewContentAlignment.MiddleLeft);
    DataGridViewBinding.CreateColumn(dgvInvoices,
    "Customer", "Customer");
    DataGridViewBinding.CreateColumn(dgvInvoices,
    "Name", "Name");
    DataGridViewBinding.CreateColumn(dgvInvoices,
    "Count", "Count");
    DataGridViewBinding.CreateColumn(dgvInvoices,
    "Total", "Total");
    DataGridViewBinding.CreateColumn(dgvInvoices,
    "Driver", "Driver");
    DataGridViewBinding.CreateColumn(dgvInvoices,
    "Status", "Status");
    DataGridViewBinding.CreateColumn(dgvInvoices,
    "ARHID", "ARHID");
    DataGridViewBinding.CreateColumn(dgvInvoices,
    "AR", "AR");
                dgvInvoices.Columns["ARHID"].Visible =
    false;
                dgvInvoices.Columns["AR"].Visible =
    false;
    this.dgvInvoices.Columns[0].DefaultCellStyle.Font =
    new Font("Arial", 18,
    FontStyle.Bold);
    this.dgvInvoices.Columns["Date"].DefaultCellStyle.Font =
    new Font("Arial", 10,
    FontStyle.Bold);
    this.dgvInvoices.Columns[2].DefaultCellStyle.Font =
    new Font("Arial", 10,
    FontStyle.Bold);
    this.dgvInvoices.Columns["Customer"].DefaultCellStyle.Font =
    new Font("Arial", 10,
    FontStyle.Bold);
    this.dgvInvoices.Columns["Name"].DefaultCellStyle.Font =
    new Font("Arial", 10,
    FontStyle.Bold);
    this.dgvInvoices.Columns["Count"].DefaultCellStyle.Font =
    new Font("Arial", 10,
    FontStyle.Bold);
    foreach (DataGridViewColumn dc
    in dgvInvoices.Columns)
                    dc.ReadOnly =
    true;
    if (dc.HeaderText.ToLower() ==
    "count" || dc.HeaderText.ToLower() ==
    "name" || dc.Index == 0)
    this.dgvInvoices.Columns[dc.Index].AutoSizeMode =
    DataGridViewAutoSizeColumnMode.AllCellsExceptHeader;
    else
    this.dgvInvoices.Columns[dc.Index].AutoSizeMode =
    DataGridViewAutoSizeColumnMode.Fill;
                dgvInvoices.DefaultCellStyle.Alignment =
    DataGridViewContentAlignment.MiddleCenter;
                dgvInvoices.Columns[0].ReadOnly =
    false;
                dgvInvoices.Columns[0].Width = 25;
                dgvInvoices.Columns[0].SortMode =
    DataGridViewColumnSortMode.Automatic;
    The problems I have here are
    1. The first checkbox doesn't check off (it used to work when the width was 25 but then I added the code ontop to make the autosize mode of this columns to allcellscellsexcept header it stopped working. I need that though because if I don't make the autosizemode
    = all cells except header then when I make the form narrow the checkbox column disappears.) I was wondering why this is happening, and how to fix it.
    2. Also this column is not sortable. I added to my code  dgvInvoices.Columns[0].SortMode = DataGridViewColumnSortMode.Automatic;
    but it doesn't seem to work.
    3. Whenever I sort another column the checked off checkboxes lose their focus. I understand that can be a problem with a bound datagridview and one unbound column, but how can I fix it?
    Debra has a question

    I loaded the data for all the rows from a datatable on the form. The checkbox column is that connected to that bound data. it's just there and I need to be able to tell if each row was checked or not, and I need to be able to sort the checkbox column. I
    also need to be able to sort all the other columns without losing the check. The only thing commenting out the foreach would help would be that the first checkbox can be checked, but I want it to be autosizemode = allcellsexceptheader and I want to understand
    why it's not working like this. Would you have any ideas? Below is how I bound the datagridview for all columns except the checkbox column.
            private
    void LoadDataGridView()
    DataGridViewBinding.BindWithData(false, dsInvoicingFilter.Tables[0], dgvInvoices, lblEntryCount, bs);
    if (dsInvoicingFilter.Tables[0].Rows.Count == 0)
                    btnDelete.Enabled =
    false;
                    btnOpenInvoice.Enabled =
    false;
                    btnPrint.Enabled =
    false;
                    btnSaveAsInvoice.Enabled =
    false;
                    btnVoid.Enabled =
    false;
                    btnShip.Enabled =
    false;
    else
                    btnDelete.Enabled =
    true;
                    btnOpenInvoice.Enabled =
    true;
                    btnPrint.Enabled =
    true;
                    btnSaveAsInvoice.Enabled =
    true;
                    btnVoid.Enabled =
    true;
                    btnShip.Enabled =
    true;
                    bs.Position = 0;
                dgvInvoices.Columns[0].Width = 25;
                txtSearch.Text =
    public static
    void BindWithData(bool autoGenerateColumns,
    DataTable datatable,
    DataGridView datagridview, Label lblDGVEntryCount,
    BindingSource bs)
                datagridview.AutoGenerateColumns = autoGenerateColumns;
                bs.DataSource = datatable;
                datagridview.DataSource = bs;
                DataGridViewEntryCount(datagridview, lblDGVEntryCount);
    //ExpandColumns(datagridview);//to do it slows it down. Why can't the dgv remember to do it from when initialized it?
    Debra has a question

  • Problem with inserting html code.

    Hello,
    I have a problem with the inclusion of this code html connected to the CSS style sheets:
    <head>
    <link href='http://fonts.googleapis.com/css?family=Raleway:320,320,300' rel='stylesheet' type='text/css'>
    <link rel="stylesheet" type="text/css" href="assets/normalize.css" />
    <link rel="stylesheet" type="text/css" href="assets/demo.css" />
    <link rel="stylesheet" type="text/css" href="assets/component.css" />
      </header>
        <div class="grid">
        <figure class="effect-lily">
        <img src="assets/1.jpg" alt="img01" class="effect-honey"/></figure>
      </a>
    </section>
    </div><!-- /container -->
    </body>
    </html>
    1) Does not appear in the preview thumbnail adobe muse.
    2) The pull-down menu or previously entered disappears from display problems once exported the site in html.
    Removing the html code menu work correctly.
    Where is the problem ??

    Most likely there is a critical code error somewhere. Use the W3C validation tools to check your CSS and HTML code.
    CODE VALIDATION TOOLS
    CSS - http://jigsaw.w3.org/css-validator/
    HTML - http://validator.w3.org/
    Nancy O.

  • OAF page: problem with insert data

    Hi,
    I have created a table with 1 sequence value.
    I am able to add a sequence value in that table when I click on Apply  button in the page. But I am not able to insert other attribute values in the table.
    InsertEOImpl.java
    package PD08.oracle.apps.fnd.XXSR.server;
    import oracle.apps.fnd.framework.server.OAEntityImpl;
    import oracle.jbo.AttributeList;
    import oracle.jbo.Key;
    import oracle.jbo.domain.Char;
    import oracle.jbo.domain.DBSequence;
    import oracle.jbo.domain.Date;
    import oracle.jbo.domain.Number;
    import oracle.jbo.domain.RowID;
    import oracle.jbo.server.AttributeDefImpl;
    import oracle.jbo.server.EntityDefImpl;
    import oracle.apps.fnd.framework.server.OADBTransaction;
    // ---    File generated by Oracle ADF Business Components Design Time.
    // ---    Custom code may be added to this class.
    // ---    Warning: Do not modify method signatures of generated methods.
    public class InsertEOImpl extends OAEntityImpl
      public static final int ROWID1 = 0;
      public static final int EMPLOYEENO = 1;
      public static final int USERNAME = 2;
      public static final int OPTIONNAME = 3;
      public static final int DESCRIPTION = 4;
      public static final int REQUESTSTATUS = 5;
      public static final int LASTUPDATEDATE = 6;
      public static final int LASTUPDATEDBY = 7;
      public static final int CREATIONDATE = 8;
      public static final int CREATEDBY = 9;
      public static final int LASTUPDATELOGIN = 10;
      private static InsertEODefImpl mDefinitionObject;
      /**This is the default constructor (do not remove)
      public InsertEOImpl()
      /**Retrieves the definition object for this instance class.
      public static synchronized EntityDefImpl getDefinitionObject()
        if (mDefinitionObject == null)
          mDefinitionObject = (InsertEODefImpl)EntityDefImpl.findDefObject("PD08.oracle.apps.fnd.XXSR.server.InsertEO");
        return mDefinitionObject;
      /**Add attribute defaulting logic in this method.
      public void create(AttributeList attributeList)
        super.create(attributeList);
    //added below code to get the sequence value.
    OADBTransaction transaction = getOADBTransaction();
    Number value1 = transaction.getSequenceValue("xxcbl.row_id_seq");
    setAttributeInternal(ROWID1, value1);
      /**Add entity remove logic in this method.
      public void remove()
        super.remove();
      /**Add Entity validation code in this method.
      protected void validateEntity()
        super.validateEntity();
      /**Gets the attribute value for RowId1, using the alias name RowId1
      public DBSequence getRowId1()
        return (DBSequence)getAttributeInternal(ROWID1);
      /**Sets <code>value</code> as the attribute value for RowId1
      public void setRowId1(DBSequence value)
    setAttributeInternal(ROWID1, value);
      /**Gets the attribute value for EmployeeNo, using the alias name EmployeeNo
      public String getEmployeeNo()
        return (String)getAttributeInternal(EMPLOYEENO);
      /**Sets <code>value</code> as the attribute value for EmployeeNo
      public void setEmployeeNo(String value)
        setAttributeInternal(EMPLOYEENO, value);
      /**Gets the attribute value for UserName, using the alias name UserName
      public String getUserName()
        return (String)getAttributeInternal(USERNAME);
      /**Sets <code>value</code> as the attribute value for UserName
      public void setUserName(String value)
        setAttributeInternal(USERNAME, value);
      /**Gets the attribute value for OptionName, using the alias name OptionName
      public String getOptionName()
        return (String)getAttributeInternal(OPTIONNAME);
      /**Sets <code>value</code> as the attribute value for OptionName
      public void setOptionName(String value)
        setAttributeInternal(OPTIONNAME, value);
      /**Gets the attribute value for Description, using the alias name Description
      public String getDescription()
        return (String)getAttributeInternal(DESCRIPTION);
      /**Sets <code>value</code> as the attribute value for Description
      public void setDescription(String value)
        setAttributeInternal(DESCRIPTION, value);
      /**Gets the attribute value for RequestStatus, using the alias name RequestStatus
      public String getRequestStatus()
        return (String)getAttributeInternal(REQUESTSTATUS);
      /**Sets <code>value</code> as the attribute value for RequestStatus
      public void setRequestStatus(String value)
        setAttributeInternal(REQUESTSTATUS, value);
      /**Gets the attribute value for LastUpdateDate, using the alias name LastUpdateDate
      public Date getLastUpdateDate()
        return (Date)getAttributeInternal(LASTUPDATEDATE);
      /**Sets <code>value</code> as the attribute value for LastUpdateDate
      public void setLastUpdateDate(Date value)
        setAttributeInternal(LASTUPDATEDATE, value);
      /**Gets the attribute value for LastUpdatedBy, using the alias name LastUpdatedBy
      public Number getLastUpdatedBy()
        return (Number)getAttributeInternal(LASTUPDATEDBY);
      /**Sets <code>value</code> as the attribute value for LastUpdatedBy
      public void setLastUpdatedBy(Number value)
        setAttributeInternal(LASTUPDATEDBY, value);
      /**Gets the attribute value for CreationDate, using the alias name CreationDate
      public Date getCreationDate()
        return (Date)getAttributeInternal(CREATIONDATE);
      /**Sets <code>value</code> as the attribute value for CreationDate
      public void setCreationDate(Date value)
        setAttributeInternal(CREATIONDATE, value);
      /**Gets the attribute value for CreatedBy, using the alias name CreatedBy
      public Number getCreatedBy()
        return (Number)getAttributeInternal(CREATEDBY);
      /**Sets <code>value</code> as the attribute value for CreatedBy
      public void setCreatedBy(Number value)
        setAttributeInternal(CREATEDBY, value);
      /**Gets the attribute value for LastUpdateLogin, using the alias name LastUpdateLogin
      public Number getLastUpdateLogin()
        return (Number)getAttributeInternal(LASTUPDATELOGIN);
      /**Sets <code>value</code> as the attribute value for LastUpdateLogin
      public void setLastUpdateLogin(Number value)
        setAttributeInternal(LASTUPDATELOGIN, value);
      /**getAttrInvokeAccessor: generated method. Do not modify.
      protected Object getAttrInvokeAccessor(int index,
                                             AttributeDefImpl attrDef) throws Exception
        switch (index)
        case ROWID1:
          return getRowId1();
        case EMPLOYEENO:
          return getEmployeeNo();
        case USERNAME:
          return getUserName();
        case OPTIONNAME:
          return getOptionName();
        case DESCRIPTION:
          return getDescription();
        case REQUESTSTATUS:
          return getRequestStatus();
        case LASTUPDATEDATE:
          return getLastUpdateDate();
        case LASTUPDATEDBY:
          return getLastUpdatedBy();
        case CREATIONDATE:
          return getCreationDate();
        case CREATEDBY:
          return getCreatedBy();
        case LASTUPDATELOGIN:
          return getLastUpdateLogin();
        default:
          return super.getAttrInvokeAccessor(index, attrDef);
      /**setAttrInvokeAccessor: generated method. Do not modify.
      protected void setAttrInvokeAccessor(int index, Object value,
                                           AttributeDefImpl attrDef) throws Exception
        switch (index)
        case ROWID1:
          setRowId1((DBSequence)value);
          return;
        case EMPLOYEENO:
          setEmployeeNo((String)value);
          return;
        case USERNAME:
          setUserName((String)value);
          return;
        case OPTIONNAME:
          setOptionName((String)value);
          return;
        case DESCRIPTION:
          setDescription((String)value);
          return;
        case REQUESTSTATUS:
          setRequestStatus((String)value);
          return;
        case LASTUPDATEDATE:
          setLastUpdateDate((Date)value);
          return;
        case LASTUPDATEDBY:
          setLastUpdatedBy((Number)value);
          return;
        case CREATIONDATE:
          setCreationDate((Date)value);
          return;
        case CREATEDBY:
          setCreatedBy((Number)value);
          return;
        case LASTUPDATELOGIN:
          setLastUpdateLogin((Number)value);
          return;
        default:
          super.setAttrInvokeAccessor(index, value, attrDef);
          return;
      /**Creates a Key object based on given key constituents
      public static Key createPrimaryKey(DBSequence rowId1)
        return new Key(new Object[]{rowId1});
    Please help.
    Thanks,
    Prajakta

    Ok, not to put to fine a point on it, but you might what to learn to use the tool.
    goggle "php oci_bind_by_name()" and you will get this: http://php.net/manual/en/function.oci-bind-by-name.php
    Cj is gong to ignore you because 1, you are not listening, just demanding an answer and 2. you don't seem to be willing to help yourself.
    Getting data from $_POST is simple $someVar = $_POST['some_value'] .
    One way to try and troubleshoot this is to simply run it from the cli eg: php name_ot_script.php this will tell you if you have any syntax errors, which is the most likely problem since you say the script reports nothing, just a blank screen.
    After each call to OCI test for errors and display them if any.
    Do your homework and you will find that things work rather well with OCI8

  • Problem with "Insert" and "Overwrite Sequence Content"

    I'm working with XDCAM footage. I like to take all the individual clips recorded on the XDCAM disc, and after getting them into FCP, taking them and putting them all in a sequence in FCP, then using that sequence as the source in the Viewer. This allows for quick scanning of all the clips, much as is it were a digitized tape.
    I recently found the "Insert Sequence Content" and "Overwrite Sequence Content" commands in FCP, and like them in that they actually put the individual clips into my project timeline, and not just the combined sequence (which looks more or less like a nest when dropped into my project sequence).
    Here's the problem: When I put IN and OUT points in the timeline, and "Insert or Overwrite Sequence Content" using the sequence containing all the clips, the video tends to be contained to between the IN and OUT points I set in the TIMELINE, but the audio tracks tend to expand past the OUT point I set in the TIMELINE, and I can't figure out why, or how to get around this.
    Any assistance would be appreciated.

    If you're inserting or overwriting, you're basically pasting the content that you've chosen. I wouldn't think the out point would be recognized, or even wanted. If you copied 5 minutes of clips and inserted it into a sequence with a 4 minute in/out point duration, do you want to only have the first 4 minutes inserted into the sequence? If you only place an in point, it will insert all the clips, starting at that point, and it will take up as much time as the clip content's duration.
    Am I missing something here?

  • Problem with inserting/removing integer in a specified index

    I have an IntList that I am adding methods to and an IntListTest driver that allows me to add those options to test. I am having difficulty adding the two methods:
    public void removeAt() - removes the value at a specified location at given index with consideration of the size of the list when user enters a valid position
    public void insertAt(int index, int newValue) - inserts integer and puts it in the specified index of list however...i also have to take into consideration the size of the list as the user enters a valid position
    I started on the insertAt(int index, int newValue) method:
    // **Inserts an element to the list at a specified position
    public void insertAt(int index, int newValue)
    IntNode newnode = new IntNode(newValue, null);
    for (int index =0; index < count; index++)
    if(list[index] == newValue) //error occurs, brackets pertain to arrays, correct?
    //if list is empty, this will be the only node in it
    if (list == null)
    list = newnode;
    else
    //temp point directed to the last thing on list, but want to be
    //able to insert any where, specified location
    IntNode temp = list;
    while (temp.next != null)
    temp = temp.next;
    //link new node into list and insert
    temp.next = newnode;
    count++;
    }First off, how do I write the method so that the user specifies a value at a given index and is located...From what I understand, this portion of the insertAt method is stating that the temp point will go directly to the last index:
    //temp point directed to the last thing on list, but want to be
    //able to insert any where, specified location
    IntNode temp = list;
    while (temp.next != null)
    temp = temp.next;Here's where I am having complications, because I don't know where to go from here. I want the method to be able to insert at any specified index rather than just the last...I will use the insertAt method as an example for my removeAt method, so hopefully I can get input from anyone willing to help...Thanks - using textpad editor with java 1.5 compiler
    Onip28

    This problem/question pertains to making the necessary adjustments with the "next" values in the associated nodes. I replied to your other posting, and once again, thank for your reply and help. However, the code posted for today is not the changed and saved code as expected, but the changed have been noted and changed. Thanks again...
    Onip28

  • Problem with Insert process in Master Forms?

    Hi Patrick,
    It will be very greatful to me if you can help me out why insert is not working in case of forms as explained below
    I have created a tabular form where i am able to update & delete and adding rows with out any problem.
    When i am trying a insert a new record it is throwing the below error...
    Error in mru internal routine: ORA-20001: Error in MRU: row= 1, ORA-20001: ORA-20001: Current version of data in database has changed since user initiated update process. current checksum = "D47F24D590E442A8BCF98D5BA7D782AC", item checksum = "B3FF449D4A98A3313839C25D15586A17"., update "APEX_DEMO_SCHEME"."DEPT" set "DEPTNO" = :b1, "DNAME" = :b2, "LOC" = :b3
    Thanks,
    Anoo..
    Edited by: Anoo on Jul 20, 2010 3:37 AM
    Edited by: Anoo on Jul 20, 2010 3:38 AM

    If I were you, I would never do this through any program. The only secure, reliable way is to rewrite everything by your own hands. Even if we could argue, your way works as well (and could be faster at the beginning), at the firt moment you will be asked to perform any tiny change in this "imported" thing, you will cry your eyes out (and understand why it is the only useful way to rewrite everything manually).
    regards Otto

  • Problem with inserting title sheet in sequence

    Hi everyone,
    I've recently started using Premiere Pro CS5 so I've only mastered the basics, but up untill now everything went well.
    My problem is as follows:
    To add a title in a sequence, I could drag it from the Project Menu in my sequence or click on the right mouse button and select the option 'insert' or 'overlay'.
    Currently however, the right mouse menu does not display these options, i.e. they're grey and unclickable. Moreover, when I drag a title to the sequence, it automatically 'overlays' instead of 'inserting'.
    In order to insert a title in my sequence, I now have to open in in te Source Monitor (that option is clickable), choose 'insert' and drag the title in the sequence. It's quite laborious and frustrating, since I have a feeling it's just a matter of changing my settings...
    Could you please help me out on this one?
    Thanks!

    When editing from the Project Panel via right-click or keyboard shortcut, you must have tracks targeted in your sequence. Here's a comparison:
    Basically, you have to tell Premiere where you want the clip to be inserted or overlaid, and that's accomplished with the track selectors being on or off.
    Moreover, when I drag a title to the sequence, it automatically 'overlays' instead of 'inserting'.
    Hold down the Control/Command key to do an insert edit; you'll see the mouse pointer change to indicate the different type of edit.

  • Problems With Inserting/Changing Artwork - Help Requested

    OK...let me set this up...
    I currently have approximately 3500 files. When I first starting importing my CD's, I didn't see the need for what I saw as superficial information that I would never need or want. Just song title and artist. Then, sometime ago, I got interested in adding artwork to my files. Back then, it wasn't as important and I kind of didn't take the time to really spend on the files to get what would be quality artwork for all of my files. However, all got artwork and it worked fine.
    Fast forward to more recent times, and I decided to improve the artwork for those that I took a more lackadaisical approach previously. Now, I have finished going over them, but I seemed to have some issues with about two dozen files, and it is most perplexing. Any help would be greatly appreciated...
    What the issue is that I can't alter the artwork for these two dozen files. I have copy/pasted artwork in the INFO box, and have even tried deleting what was there previously, but to no avail. In addition, I can insert artwork with MPFreaker, and have iTunes show it, but if I alter ANY of the other information in either MPFreaker or iTunes (album, title, etc...), the artwork disappears. However, this does not appear to be the same issue as other issues that I have read about as I researched this seeking an answer. For one thing, it's only the artwork that can't be altered. Other information can be altered with no problem. These are not locked files in the Finder. Also, the permissions are the same as the rest of the other 3400+ files. In addition, I even took the additional step and set the permissions to the iTunes Music folder and then selected "Apply To Enclosed Items" to make sure that all have the same permissions, but to no avail.
    The files also play with no apparent problem.
    Any help or insight would be most greatly appreciated. If anyone needs any additional info, just ask or check the info about my setup below.

    OK...some additional information for those that come across this....
    After some more checking, I realized that even though I could change/save other TAG information on the file within iTunes, it was not saving it with the file...When I made changes and then checked with another program, those changes were not reflected, although some of the reverse was true - changes made in the TAG program were not always recognized in iTunes. So in frustration, I opened the file within a sound editor and then faked a change (copy/paste/undo) and then saved....at that point, the file was properly recognized in iTunes.
    Hope this helps someone.

  • Problem with inserting data into mySQL database with jsp

    I have a jsp page that collects infromation about a users vehicle and puts the data into a mySQL database. Iv'e been messing around with it for ages & i can't seem to get it to work even though i cannot see anything wrong with the code, which can be seen below.
    <%@ page contentType="text/html; charset=iso-8859-1" language="java" import="java.sql.*" errorPage="" %>
    <%@ include file="Connections/connection.jsp" %>
    <%
    // *** Restrict Access To Page: Grant or deny access to this page
    String MM_authorizedUsers="";
    String MM_authFailedURL="login_form.jsp";
    boolean MM_grantAccess=false;
    if (session.getValue("MM_Username") != null && !session.getValue("MM_Username").equals("")) {
      if (true || (session.getValue("MM_UserAuthorization")=="") ||
              (MM_authorizedUsers.indexOf((String)session.getValue("MM_UserAuthorization")) >=0)) {
        MM_grantAccess = true;
    if (!MM_grantAccess) {
      String MM_qsChar = "?";
      if (MM_authFailedURL.indexOf("?") >= 0) MM_qsChar = "&";
      String MM_referrer = request.getRequestURI();
      if (request.getQueryString() != null) MM_referrer = MM_referrer + "?" + request.getQueryString();
      MM_authFailedURL = MM_authFailedURL + MM_qsChar + "accessdenied=" + java.net.URLEncoder.encode(MM_referrer);
      response.sendRedirect(response.encodeRedirectURL(MM_authFailedURL));
      return;
    String vehicle_details__registration = null;
    if(request.getParameter("txt_registration") != null){ vehicle_details__registration = (String)request.getParameter("txt_registration");}
    String vehicle_details__make = null;
    if(request.getParameter("txt_make") != null){ vehicle_details__make = (String)request.getParameter("txt_make");}
    String vehicle_details__model = null;
    if(request.getParameter("txt_model") != null){ vehicle_details__model = (String)request.getParameter("txt_model");}
    String vehicle_details__colour = null;
    if(request.getParameter("txt_colour") != null){ vehicle_details__colour = (String)request.getParameter("txt_colour");}
    String vehicle_details__tax_class = null;
    if(request.getParameter("select_tax_class") != null){ vehicle_details__tax_class = (String)request.getParameter("select_tax_class");}
    String vehicle_details__chasis_num = null;
    if(request.getParameter("chasis_num") != null){ vehicle_details__chasis_num = (String)request.getParameter("chasis_num");}
    String vehicle_details__status = null;
    if(request.getParameter("radio_status") != null){ vehicle_details__status = (String)request.getParameter("radio_status");}
    String owner_details__MMColParam = "1";
    if (session.getValue("MM_Username") !=null) {owner_details__MMColParam = (String)session.getValue("MM_Username");}
    Driver Drivervehicle_details = (Driver)Class.forName(MM_connection_DRIVER).newInstance();
    Connection Connvehicle_details = DriverManager.getConnection(MM_connection_STRING,MM_connection_USERNAME,MM_connection_PASSWORD);
    PreparedStatement vehicle_details = Connvehicle_details.prepareStatement("INSERT INTO vehicle_man_db.vehicle_details (registartion, make, model, colour, tax_class, chasis_num) VALUES ('"+ String vehicle_details__registration + "', '"+ String vehicle_details__make + "', '"+ String vehicle_details__model + "', '"+ String vehicle_details__colour + "', '"+ String vehicle_details__tax_class + "', '"+ String vehicle_details__chasis_num + "', '"+ String vehicle_details__status + "')");
    vehicle_details.executeUpdate();
    %>
    <form name="add_vehicle_form" id="add_vehicle_form">
      <p>Registration mark:
        <input name="txt_registration" type="text" id="txt_registration">
    </p>
      <p>Make:
        <input name="txt_make" type="text" id="txt_make">
    </p>
      <p>Model:
        <input name="txt_model" type="text" id="txt_model">
    </p>
      <p>Colour:
        <input name="txt_colour" type="text" id="txt_colour">
      </p>
      <p>Tax Class:
        <select name="select_tax_class" id="select_tax_class">
          <option value="AAA">Band AAA (up to 100g/km)</option>
          <option value="AA">Band AA (101 - 120g/km)</option>
          <option value="A">Band A (121 - 150g/km)</option>
          <option value="B">Band B (151 - 165g/km)</option>
          <option value="C">Band C (166 - 185g/km)</option>
          <option value="D">Band D (Over 185g/km)</option>
        </select>
      </p>
      <p>Chasis Number:
        <input name="txt_chassis_num" type="text" id="txt_chassis_num">
    </p>
      <p>Status: active:
        <input name="radio_status" type="radio" value="1" checked>
        off-road
        <input name="radio_status" type="radio" value="0">
      </p>
      <p>
        <input type="submit" name="Submit" value="Submit">
    </p>
    </form>
    <%
    Connvehicle_details.close();
    %>This is the error I am getting from the server
    org.apache.jasper.JasperException: Unable to compile class for JSP
    An error occurred at line: 3 in the jsp file: /add_vehicle_form.jsp
    Generated servlet error:
    C:\Servers\Tomcat 5.0\work\Catalina\localhost\Assignment\org\apache\jsp\add_005fvehicle_005fform_jsp.java:113: ')' expected
    PreparedStatement vehicle_details = Connvehicle_details.prepareStatement("INSERT INTO vehicle_man_db.vehicle_details (registartion, make, model, colour, tax_class, chasis_num) VALUES ('"+ String vehicle_details__registration + "', '"+ String vehicle_details__make + "', '"+ String vehicle_details__model + "', '"+ String vehicle_details__colour + "', '"+ String vehicle_details__tax_class + "', '"+ String vehicle_details__chasis_num + "', '"+ String vehicle_details__status + "')");
    ^
    1 error
         org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:84)
         org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:332)
         org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:412)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:472)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:451)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:439)
         org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:511)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:295)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    Any help would be much appreciated.
    Thanks

    use this ...
    PreparedStatement vehicle_details =
    Connvehicle_details.prepareStatement("INSERT INTO
    vehicle_man_db.vehicle_details (registartion, make,
    model, colour, tax_class, chasis_num) VALUES
    vehicle_details .setString(1,String
    vehicle_details__registration );
    vehicle_details setString(2,String
    vehicle_details__make );
    vehicle_details .setString(3,String
    vehicle_details__model );
    vehicle_details .setString(4,vehicle_details__colour
    vehicle_details .setString(5,String
    vehicle_details__tax_class);
    vehicle_details .setString(6,String
    vehicle_details__chasis_num );
    vehicle_details .executeQuery();Even you need a screwing up... what's the point putting that String inside. That's the bloody error.

Maybe you are looking for

  • I'm running 5.0.1 which isn't compatible with the website used by my graduate studies program. In lieu of switching to IE 9 to access this site, is there any way to gain access to Firefox 4.0?

    The website used by my graduate studies program doesn't yet support Firefox 5.0. In lieu of switching browsers, I would like to get an older version of Firefox (4.0) to support my studies. Thanks.

  • Workflow: step specific tab

    Hello Gurus, I need to display two tables in a work item and to handle that I have created a custom screen.  I am calling my screen in Work Item Display tab in workflow.  Now when is use the demo screen provided by SAP (program SAPLSWL0 and screen 01

  • Log in to US store

    Ok, so I downloaded the iOS6 update and now when I try to buy apps in the app store, I can't. I keep getting a message that says I need to log into the U.S. store. Now I'm currently deployed and have been for a few months but this has never been a pr

  • Bridge CC & Photoshop CC

    I have Windows 7 Pro - 64 bit - Adobe CC: Question:  Could anyone tell me - in a straight forward manner - why/how/where/ "Output" is missing from Adobe Bridge CC (to send selected images from Bridge to Photoshop CC into a single document with variou

  • Unable to set bounding box

    Hi, I´m trying to reduce scale on a group of objects;a map, some lines with arrows and shade and also text blocks. When I´m trying to reduce the size of the group the message "unable to set bounding box" pops up and its impossible to continue scaling