Type err, need help!!

Hi all,
in html I have
<option value="MySec">2000</option> and MYSec is a table in my database.
in servlet
I have stmt.executeUpdate("insert into "+ year +"("
                            + "Name, Segment, Sequence, length,SubType,location, SampleYear, author)"
                            + "VALUES('"
                            + Name + "','"
                            + Segment+ "','"
                            + word + "','"
                            + Length + "','"                 
                            + subType + "','"
                            + location + "','"
                            + year+ "','"                          
                            + author + "'"
                            + ")");and I got error
SQLServer]Syntax error converting the varchar value 'MySec' to a column of data type int. at com.microsoft.jdbc.base.BaseExceptions.createException(Unknown Source)
I have not ideal what mistake I make , can any one help!!

<option value="MySec">2000</option>
When a user selects this option, it sends the String 'MySec' as the value of the select input.
You get this value, assign it so some variable (which one, I haven't a clue). When you try to assign that value to the database, the db is expecting an integer (numbers). But you are giving it characters ('MySec').
To fix it:
1) define the column that takes that value to use varchar instead of int datatype if you REALLY want to save the string 'MySec' in the database.
2) Use
<option value="2000">2000</option>
as the option, so a number gets assigned to the selected value instead of a string, if what you really want to save is a number.

Similar Messages

  • Type Layer --Need Help

    I have a file I'm editing in Elements 9 and run into the same prob I've run into before with other files.  Here's the scoop:
    On the original image I add 2 Gradient Fill layers, an Artistic Filter layer then, I add a Type layer.  What happens when I type is that the letters cannot be seen even though I have set the foreground color to black.   I'm thinking that the letters cannot be seen as they must be in yellow (the color of one of my Gradient Fill layers & yellow is also one of two colors in my other Gradient Fill layer).
    I have solved the problem before by deleting one of the fill layers, and then it's fine and dandy --I can do my black lettering.  With this particular project, I have to have both of the Gradient Fill layers.
    Anyone know how to solve this pesky problem?

    Linda7345,
    Try the following:
    Apply the Gradient fill layers and the artistc filter
    Open a blank layer at the top of the stack of layers
    Press CTRL+SHIFT+ALT+E to create a stamp visible layer
    Now type the text
    Be sure that you are using the horizontal or vertical type tool, not one of the mask tools
    Be sure that the font size is sufficiently large so that the typing shows up. You can enter a pt size in the tool's option bar, i.e. you are not limited to the presets in the drop down
    Be sure that the font color is not similar to the background color

  • When i type in my correct password on the login screen and press enter it just goes to a blue screen for a few seconds then goes back to the same login screen again, please i need help?

    When i type in my correct password on the login screen and press enter it just goes to a blue screen for a few seconds then goes back to the same login screen again, please i need help?

    You can take some of the steps here, #4, #5 or even trying a #18
    Step by Step to fix your Mac
    but I suspect your going to first have to create a data recovery drive
    Create a data recovery, undelete boot drive
    to get your data off the machine,
    then do a #20 to eliminate the bad sectors as that's why your getting the "pinwheel" it's getting a delay reading from the drive, right when your trying to log in too, what a bad spot for it to happen.
    Step by Step to fix your Mac

  • Need help to trace the place where error occuring in Web UI of type System

    Hi All,
    Need help to trace the place where error occurring in Web UI of type System error,
    this error coming while saving the corporate account creation,
    error message description : - System error: Interruption in Routine READ TABLE GT_CHAR_VAL, CHAR_NAME = PVTLTD_CLEAN_SEGMENT
    System error: Interruption in Routine READ TABLE GT_CHAR_VAL, CHAR_NAME = PVTLTD_CLEAN_CLASS-CP
    thanking you.
    Best Regards,
    VijHyd

    Hi Nagaraj,
    See that the mandatory SICF setting are enabled or Active in the SICF Services.  Follow the steps as below:-
    Enter the TCode SICF
    Execute the same for Hierarchy Type SICF.
    Check the following SAP Note 1295006.
    If every thing is Active then, the IC Agent role will open.
    Still if it is not opening Let me know.
    regards,
    Sarangamath

  • Image size and mime type.. non-java guy needs help

    Image size, mime type.. non-java guy needs help
    Im not at all familiar with java so this is really weird for me to work out. I?ve been doing it all day (and half of yesterday).
    Im trying to write a custom clodFusion tag in java that gets the width, height, size and MIME types of a given file. I?ve been trying to get it to work on the command line first. I can get the width and height but cant get the size and the MIME type.
    Here is what I got
    /*import com.allaire.cfx.*;*/
    import java.awt.image.renderable.*;
    import javax.media.jai.*;
    import com.sun.media.jai.codec.*;
    import java.io.*;
    import java.util.*;
    public class ImageInfo {
    private RenderedOp image = null;
    private RenderedOp result = null;
    private int height = 0;
    private int width = 0;
    private String type = "";
    private String size = "";
    public void loadf(String file) throws IOException
    file = "80by80.jpg";
    FileSeekableStream fss = new FileSeekableStream(file);
    image = JAI.create("stream", fss);
    height = image.getHeight();
    width = image.getWidth();
    System.out.println(height + "\n");
    System.out.println(width);
    System.out.println(type);
    public static void main(String[] args) throws IOException {
    ImageInfo test = new ImageInfo();
    test.loadf(args[0]);
    can anyone please help me out to modify the above so I can also print the mime type and the file size to screen.
    thanks for any help

    any suggestions?

  • I need help in "HOW TO EXTEND THE DATA TYPE SYSTEM"......

    Hi All,
    I need to add new data type like SDO_GEOMETRY in spatial Oracle.
    I don't mean the User-Defined Datatype but new datatype embed in the database.
    I read the Data Cartridge Developer's Guide but it has info how to use more efficiently UDT through indexes.
    Anybody used the “Type System” under Databases and Extensibility Services?
    It might be written in C++ or Java but I do not know how.
    Any hints and help will be appreciated.
    Thanks,

    > In Figure 1-1 Oracle Services, there is a "Type System" as Oracle Services.
    The "Type System" is merely a compartmentalising the data type handling and implementation code/modules in Oracle.
    This covers all types. Oracle native types, user defined types (UDTs), etc.
    Saying that you want to create a new type in the "Type System" is basically saying you want to use the CREATE TYPE SQL command in Oracle.
    > So, I want new_type1 and new_type2 behave like other built-in types, just the way
    SDO_GEOMETRY works in Oracle Spatial Cartridge.
    Not familiar with the SDO_GEOMETRY. Why do you mention this type specifically? What do you want to do similar?
    > I have already done it with user-defined types. Now I need to do this way so that I can
    compare and contrast in terms of speed, space...etc for part of my research.
    Hmm.. I'm not sure what you are trying to compare ito of a UDT and Data Cartridge extensions. It is not one or the other. What research is this if I may ask?
    Simplistically you extend the Type System with a new UDT/ADT. And there you have a new type data can be used in the SQL Engine and the PL/SQL engine. The OCI (Oracle Call Interface) supports such types via the OCI object API calls - which means this new type can also be used from Oracle clients written in Delphi, C++, Java, etc.
    That new type can be a complex type. This type may need specific management code (memory management, context management, internationalisation, etc). To support this you can extend the UDT/ADT further by developing Cartridge Basic Service interfaces for the type - designing and writing management code to, for example, support specific internationalisation requirements when dealing with multibyte character sets.
    You can also extend the UDT/ADT to be custom managed ito indexing, determining query optimisation, computing costs of custom methods/functions/operators on this custom data type. These extensions are done by developing Data Cartridge interfaces for the type.
    Thus I cannot see what you are trying to compare. It is not one layer/interface versus another. These layers exist for all Oracle types (in the Type System). Oracle not only allows you to add to the top layer by adding/defining a new data type. It also allows you to customise (if needed) the layers below it.

  • New internal order type--need help

    Dear all:
    i have a case need help.
    now i want to create a new internal order type ,and assign a new number range and a default settlement rule to it .
    the settlement rule is that the actual costs of this  internal order type need to be
    sent to a cost element .
    what should i do step by step?
    thanks!
    best regards!

    Hi,
    2. Order Master Data
    2.1 Define Order types (KOT2_OPA)
    IMG &#61664;Controlling &#61664; Internal Orders &#61664;Order Master Data &#61664; Define Order Types
    An Internal order is created under an Order type. An order type is used for storing various control parameters and various defaults while creating an internal order. It is used for classifying various types of internal orders according to usage for e.g. Real orders for trade fairs, real orders for Capital investment measure, Statistical orders for motor vehicle expenses.
    The order type is client-specific, which means that every order type can be used in all controlling areas. A number range is assigned to the internal order type.
    Click on “New Entries”
    Take a drop in the field Order category and select 01
    Enter
    Update the following
    Give Order Type :- Z810
    Description :- Traders First Real order type
    Object Class :- OCOST overhead
    Reference Order :- Collective order without automatic goods movement
    Residence time 1 :- 12 months
    Residence time 2 :- 1 month
    Check “Commit Management and Check Integrated Planning
    Activate CO Partner Updating -You activate this so that allocations between orders and other CO objects (cost centers, projects, etc.), the partner information is retained and whether for each order a totals record should be written.
    Save
    Click on “Field Selection”
    Here you can hide the various fields or make it as required entry or only display or available for input. Thus while creating internal order only those fields are displayed and available for input.
    Click Save
    2.2 Maintain Number Ranges for Orders (KONK)
    IMG &#61664;Controlling &#61664; Internal Orders &#61664; Order Master Data &#61664;Maintain Number Ranges for Orders
    Number Range needs to be assigned to the internal order type. Number range can be internal or external. In Internal numbering system automatically assigns a number from the given number range. In external numbering the user has to manually assign the number from the given number range.
    We will configure internal number range for our internal order type – Trade Fair
    Click on Group &#61664;Maintain (From the menu bar)
    Click on Group &#61664; Insert (From the menu bar)
    Update the following
    From Number: - 910000000000
    To Number: - 919999999999
    Click in “plus icon” at the left bottom of the screen
    Click Save
    You will find internal order type Z810 in not assigned
    You need to assign the order type to the group we created above. Proceed as follows:-
    Position the cursor on: - Z810 Trade Fair real order type 
    Click on “Arrow”   Z810 Trade Fair real order type note it turns blue                                              
    Select Check mark Z810 A ltd India fair real order
    Click “Element Group”
    The internal order type Z910 moves under the group which can be seen as follows:-
    Z810: A Ltd India Trade fair real order / Z810 Trader Fair real order type.
    Click Save
    Select: - Z810: A Ltd India Trade fair real order / Z810 Trader Fair real order type.
    Click on “Pencil” icon.
    Click Back arrow.
    2.3 Define Model Orders
    IMG &#61664;Controlling &#61664;Internal Orders &#61664;Order Master Data &#61664;Screen Layout
    &#61664;Define Model Orders
    Model orders are not orders in the commercial sense, but serve merely as references for creating "normal" orders. Model orders contain default values for the orders in an order type. The Model order is assigned as the reference order in the order type.
    When you create a new order, all the fields active in the relevant order type are copied from the model order to the new order.
    Example
    You want to settle all your marketing orders to the same sales cost center. Stipulate the cost center as the default value in the model order for marketing orders.
    When you create a new marketing order, the system defaults this cost center. If you want to settle the order to a different cost center, you can overwrite the default cost center in the orders.
    We will create a model order with some defaults and assign it to the Trade fair internal order type
    Click “Create CO Model Order”
    Press F4 and select ($$) 03 model order
    Click on the master data and update the following
    Order: - $$$ Z81000001
    Description text: - A Limited Trade affair
    Click Save
    Assign this model order to the order type Z810
    Update the reference order with the model order number $$$Z81000001 in the reference order field
    Click on save.
    3 Planning
    3.1 Maintain User-Defined Planner Profiles
    IMG&#61664;Controlling&#61664;Internal Orders&#61664;Planning&#61664;Manual Planning&#61664;Maintain User-Defined Planner Profiles
    Check the User defined planner profile ZOCM91 created by us contains the layouts for internal orders.
    Double click on General controlling
    Planning area: Cost element/activity inputs.
    Cost Center: Activities/Prices
    CCtr Statistical key figures
    Orders: Cost Element/Activity inputs
    Ord: Statistical key figures
    Select :- Orders: Cost element/activity inputs
    Double Click on Layouts for control
    3.2 Maintain Planner Profile for Overall Planning (OKOS)
    IMG &#61664; Controlling&#61664;Internal Orders&#61664;Planning&#61664;Manual Planning&#61664;Maintain Planner Profile for Overall Planning
    Here you can specify the time frame for which values are to be planned for Internal order. Further you can also default the number of decimal places and the display factor. Default cost element group while planning.
    Double click on “Define planning profile for overall planning”
    Click on “New Entries”
    Select “05 Planned Total”
    Profile: 810000 General Plan Profile – A Ltd
    Click Save
    Select back arrow
    Double click maintain planning profile for order type
    Give: - Z810 Trader Fairs Real order type
    Give Plan profile: - 910000
    Click Save
    4 Settlement
    4.1 Maintain Allocation structure
    IMG&#61664; Controlling&#61664;Internal Orders&#61664;Actual Postings&#61664;Settlement&#61664; Maintain Allocation Structures
    An Allocation structure comprises one or several settlement assignments. An assignment shows which costs (origin: cost element groups) are to be settled to which receiver type (e.g. cost center, order and so on)
    You have 2 options:- You can settle to a settlement cost element or settle by cost element i.e. settle using the original cost element.
    We will use settle by cost element.
    Click on “New Entries”
    Allocation stru :- Z8
    A Ltd : Internal order settlement structure
    Click Save
    Select Z8 Internal order settlement structure
    Double click on Assignments
    Click on “New Entries”
    Assignment :- 10 Settlement Primary cost Element
    Click Save
    Select 10 Settlement Primary cost Element
    Double Click on Source
    Give From Cost Element To Cost Element
    Save
    Click back arrow
    Note:-The color has become green
    Select: Settlement primary cost element
    Double click on Settlement cost
    Click “New Entries”
    Select CTR Cost Center
    By Cost Element  Check
    Save
    4.2 Maintain Settlement Profile
    IMG &#61664;&#61472;Controlling &#61664;Internal Orders &#61664;Actual Postings &#61664;Settlement&#61664;Maintain Settlement Profile
    Here we define a range of control parameters for settlement.
    Double Click on “Maintain Settlement Profiles”
    Click on “New Entries”
    Select “Settlement not allowed”
    Assign the allocation structure Z9 created earlier in the settlement profile.
    Click on “Save”.
    Select Back Arrow
    Double Click on “Enter Settlement Profile in order types”
    Give Settlement Profile “ Z9100”
    Click on “Save”.
    4.3 Maintain Number Ranges for Settlement Documents
    IMG &#61664;Controlling &#61664;Internal Orders &#61664;Actual Postings &#61664;Settlement&#61664;Maintain Number Ranges for Settlement Documents
    You should define separate number range intervals for settlement documents for each controlling area.
    Click Group &#61664; Maintain
    Click Group&#61664; Insert
    Update the following:-
    Give “From Number” 1000000000- To Number 1999999999
    Click on “+” at the bottom left side.
    Click 8100
    Click on “Arrow” icon.
    Select Settlement documents for “A limited” Check box
    Click “Element group button”
    Click “SAVE”
    Assign Points
    Zia

  • Need help with error: XML parser failed: Error An exception occurred! Type:......

    <p>Need help with the following error.....what does it mean....</p><p>28943 3086739136 XML-240304 3/7/07 7:13:23 PM |SessionNew_Job1<br /><font color="#ff0000">28943 3086739136 XML-240304 3/7/07 7:13:23 PM XML parser failed: Error <An exception occurred! Type:UnexpectedEOFException, Message:The end of input was not expected> at</font><br />28943 3086739136 XML-240304 3/7/07 7:13:23 PM line <7>, char <8> in <<?xml version="1.0" encoding="WINDOWS-1252" ?><br />28943 3086739136 XML-240304 3/7/07 7:13:23 PM <DSConfigurations><br />28943 3086739136 XML-240304 3/7/07 7:13:23 PM <DSConfiguration default="true" name="Configuration1"><br />28943 3086739136 XML-240304 3/7/07 7:13:23 PM <case_sensitive>no</case_sensitive><br />28943 3086739136 XML-240304 3/7/07 7:13:23 PM <database_type>Oracle</database_type><br />28943 3086739136 XML-240304 3/7/07 7:13:23 PM <db_alias_name1>ODS_OWNER</db_alias_name1><br />28943 3086739136 XML-240304 3/7/07 7:13:23 PM <db_ali>, file <>.<br />28943 3086739136 XML-240307 3/7/07 7:13:23 PM |SessionNew_Job1<br />28943 3086739136 XML-240307 3/7/07 7:13:23 PM XML parser failed: See previously displayed error message.</p><p>Any help would be greatly appreciated.  It&#39;s something to do with my datasource and possibly the codepage but I&#39;m really not sure.</p><p>-m<br /></p>

    please export your datastore as ATL and send it to support. Somehow the internal language around configurations got corrupted - never seen before.

  • HT5622 I need help trying to figure out why I'm not able to purchase anythi iTunes. I changed my password, that didn't help. I changed my payment type, that didn't help. It initially started when my password got disabled. Any advice?

    I need help trying to figure out why I'm not able to purchase anything on iTunes. I changed my password, that didn't help. I changed my payment type, that didn't help. It initially started when my password got disabled. Any advice?

    I need help trying to figure out why I'm not able to purchase anything on iTunes. I changed my password, that didn't help. I changed my payment type, that didn't help. It initially started when my password got disabled. Any advice?

  • I need help with my motherboard type

    hello please i need help acquiring a motherboard for a laptop i damaged the motherboard a few weeks after purchase, the motherboard number is 766459-501 its a pavilion 15, and i noticed there are lots of different types of pavilion 15. i cant seem to get any with this number so if anyone can help me how to acquire one or probably another type that can fit into the same machine its an intel core i5 . thank you

    You need to give us the Model or Product number:  http://support.hp.com/us-en/document/c00033108 Where do you live (country only)? This will affect where we send you to find a motherboard.    

  • Need help regarding currency types

    Hi All,
      I need help in understanding the currency types.
    Presently in my system previous guys have designed the currency type = 10, so all the present data is in currency type=10 only,
    Now I need the data for currency type = 30, how can i make this.
    Please give me what are the different ways of achieving this.
    Thanks,
    vinay.

    Hi,
    If you are loading data for currency types then you can use it in Reorts for restrictions, if you are giving any selection in InfPackage then you need to change it for your requirement, else you need to reload the compeletly load the data from ECC.
    Thanks
    Reddy

  • HT1206 I can't log into the Itunes store.  I type in my Apple ID and my password and the message "This Apple ID cannot be used for the iTunes Store." "Enter another Apple ID."  I need help on fixing this.

    I can't log into the Itunes store.  I type in my Apple ID and my password and the message "This Apple ID cannot be used for the iTunes Store." "Enter another Apple ID."  I need help on fixing this.

    Yeah I'm starting to see a ton of forums posts right now about the same thing :/ I wonder what's going on

  • I can't sign in to game center in the mac i type in the password and it takes me to a blank green screen need help?

    i can't sign in to game center in the mac i type i the password and it takes me to a black green screen i need help?

    I have the same problem on my Mac OS X V 10.9.5. and its just 1 month old.
    have tried almost everything. But it looks like it's on Apple's side because there are other people with other devices (Iphone & Ipad) having the same problem.
    screenshot:

  • HT4064 I need help for a person with physical disabilities, a stylus type tool would help. Any ideas or product recommendation will be appreciated

    I am looking for a stylus type tool to help a disabled person who has difficulty with their hands and fingers . Any suggestions will be appreciated.

    http://www.techhive.com/article/1164440/macworld_buying_guide_ipad_styluses.html

  • Need help for record/table type

    Hi, All,
    I have a table below and I need to use a procedure/function to return a list of values out and use anther procedure (array with multiple values in) to update the database. Could someone please give some examples?
    Here are my questions:
    1.     I need to create a user_defined_type to hold the list of info (array like, with more fields). Does the table type with %rowtype do that? If not, Could you please give an example?
    2.     if I do
    SELECT * INTO V_test(1) FROM PREO_profile
    where user_id = '1';
    can the 3 records of user_id 1 all be selected in the V_test table? If not, could you please tell me what to do?
    Thanks a lot.
    PREO_profile:
    User_id     N_id          M_id
    1      11 111
    1      22 222
    1      33 333
    2      11 111
    2      22 222
    2      33 333
    CREATE OR REPLACE PROCEDURE test_updatePro
    (user_id in varchar2,
    profile_info out T_Test)AS
    Type T_Test is table of PREO_profile%rowtype
    index by binary_integer;
    V_test T_Test;
    BEGIN
         SELECT * INTO V_test(1) FROM PREO_profile
         where user_id = '1';
    END;

    Here is one approach. This works in 9iR2. It's worth noting this functionality is evolving quite fast. Consequently, stuff that works in 9.2 may well not work in 9.0.1 and can probably be done much neater in 10g.
    Let's start by creating some tables....
    SQL> CREATE TABLE preo (user_id NUMBER, m_id NUMBER, n_id NUMBER);
    Table created.
    SQL> INSERT INTO preo VALUES (1, 11, 111);
    1 row created.
    SQL> INSERT INTO preo VALUES (1, 22, 222);
    1 row created.
    SQL> INSERT INTO preo VALUES (1, 33, 333);
    1 row created.
    SQL> INSERT INTO preo VALUES (2, 11, 111);
    1 row created.
    SQL> INSERT INTO preo VALUES (2, 22, 222);
    1 row created.
    SQL> INSERT INTO preo VALUES (2, 33, 333);
    1 row created.
    SQL> CREATE TABLE neo_preo AS SELECT * FROM preo WHERE 1=0;
    Table created.
    SQL> We'll need some types we need for communicating between processes....
    SQL> CREATE OR REPLACE TYPE preo_t AS OBJECT (u_id NUMBER, n_id NUMBER, m_id NUMBER);
      2  /
    Type created.
    SQL> CREATE OR REPLACE TYPE preo_nt IS TABLE OF preo_t;
      2  /
    Type created.
    SQL> Here are methods to populate an array (actually a nested table)....
    SQL> CREATE OR REPLACE FUNCTION get_preo (p_uid IN NUMBER) RETURN preo_nt
      2  AS
      3    return_value preo_nt := preo_nt();
      4  BEGIN
      5    SELECT preo_t(user_id, n_id, m_id)
      6    BULK COLLECT INTO return_value
      7    FROM   preo
      8    WHERE  user_id = p_uid;
      9    RETURN return_value;
    10  END;
    11  /
    Function created.
    SQL>... and consume that array....
    SQL> CREATE OR REPLACE PROCEDURE ins_neo_preo (p_newrows IN preo_nt)
      2  AS
      3  BEGIN
      4     INSERT INTO neo_preo
      5     SELECT * FROM TABLE(CAST(p_newrows AS preo_nt));
      6  END;
      7  /
    Procedure created.
    SQL> So now we're ready to rock!
    SQL> DECLARE
      2      nt  preo_nt;
      3  BEGIN
      4      nt := get_preo(1);
      5      ins_neo_preo(nt);
      6  END;
      7  /
    PL/SQL procedure successfully completed.
    SQL>
    SQL> SELECT * FROM neo_preo
      2  /
       USER_ID       M_ID       N_ID
             1        111         11
             1        222         22
             1        333         33
    SQL> A little bit of limbo, a little bit of samba!
    Cheers, APC

Maybe you are looking for

  • Error in converting exchange rate from USD to INR

    Dear Experts, My client is Export Business & when he is creating sales documents the system gives the error as: Condition VPRS: Error in converting exchange rate from USD to INR Message no. V1208 Diagnosis An error has occurred during currency conver

  • Want last month value of a Quarter instead of to-date value

    Hi All I have a report that has 2 columns : Quarter-year , Measure1. Quarter-Year can be drilled down to the month level. Now, what is happening is because I only have the Quarter-Year as the dimension column, I'm getting the cumulative (todate) valu

  • Failure to boot in single user mode

    Hi, I have an iBook G3 900MHz G3 running 10.4.6. 384MB RAM, ~25GB free disk space. it's running slow so I want to boot in single user mode and run applejack. the trouble is, it won't boot in single user mode. when I hold command-s or command-v it jus

  • Tables for Transformation's

    Hi friends, I'm using BI 7.0  and some DataSource's are mapped like DatsSource <>Infosource and some are DataSource<>Datataget in Transformations, now I want to know what are tables which are having all mapping details in BI 7.0 Need Tables for : Dat

  • Smart mailbox stopped working

    Smart Mailboxes no longer catching incoming mails that fit the criteria. (the ones that should have been caught/tagged are in the INBOX, but not showing up in the virtual smartmail boxes. And now also, no previously 'caught' emails show up at all if