How to set a cell to accept null values.

Hello;
I am having a problem with my insert query. My form, is passing the year (2010 and up) as a null value. I am using access (ugg) and I can't get it to accept this null value. I have tried setting required to no, and allow zero lenght, even deleted the table and remade it.. STILL I get this error:
Error Executing Database Query.
[Macromedia][SequeLink JDBC Driver][ODBC Socket][Microsoft][ODBC Microsoft Access Driver]Numeric value out of range (null)
The error occurred in C:\Websites\187914kg3\accManage\signUp.cfm: line 234
Called from C:\Websites\187914kg3\accManage\signUp.cfm: line 206
Called from C:\Websites\187914kg3\accManage\signUp.cfm: line 204
Called from C:\Websites\187914kg3\accManage\signUp.cfm: line 4
Called from C:\Websites\187914kg3\accManage\signUp.cfm: line 1
Called from C:\Websites\187914kg3\accManage\signUp.cfm: line 234
Called from C:\Websites\187914kg3\accManage\signUp.cfm: line 206
Called from C:\Websites\187914kg3\accManage\signUp.cfm: line 204
Called from C:\Websites\187914kg3\accManage\signUp.cfm: line 4
Called from C:\Websites\187914kg3\accManage\signUp.cfm: line 1
232 :         <cfqueryparam cfsqltype="CF_SQL_INTEGER" value="#form.securitCode#">,
233 :         <cfqueryparam cfsqltype="CF_SQL_INTEGER" value="#form.ExpirationMonth#">,
234 :         <cfqueryparam value="#FORM.ExpirationYear#" cfsqltype="CF_SQL_VARCHAR">)
235 : </cfquery>
236 :
SQLSTATE
  22003
SQL
   INSERT INTO MerchandiseOrdersItems (c_ID, cc_type, cc_num, cc_verify, cc_expir_m, cc_expir_y) VALUES ( (param 1) , (param 2) , (param 3) , (param 4) , (param 5) , (param 6) )
VENDORERRORCODE
  3
This is my form element and query that is causing the problem:
<cfparam name="FORM.ExpirationYear" default="">
<form>
<select name="ExpirationYear" class="formSelect">
           <cfloop index="i" from="#VARIABLES.y1#" to="#VARIABLES.y2#">
              <option value="#i#"<cfif FORM.ExpirationYear EQ i> selected</cfif>>#NumberFormat(i,"0000")#</option>
           </cfloop>
         </select>
</form>
<cfquery datasource="#APPLICATION.dataSource#" dbtype="ODBC">
INSERT INTO MerchandiseOrdersItems
(c_ID, cc_type, cc_num, cc_verify, cc_expir_m, cc_expir_y)
VALUES (<cfqueryparam value="#getUpdate.NewID#" cfsqltype="CF_SQL_VARCHAR">,
        <cfqueryparam cfsqltype="cf_sql_varchar" value="#form.creditType#">,
        <cfqueryparam cfsqltype="CF_SQL_LONGVARCHAR" value="#form.creditCard#">,
        <cfqueryparam cfsqltype="CF_SQL_INTEGER" value="#form.securitCode#">,
        <cfqueryparam cfsqltype="CF_SQL_INTEGER" value="#form.ExpirationMonth#">,
        <cfqueryparam value="#FORM.ExpirationYear#" cfsqltype="CF_SQL_VARCHAR" null="yes">)
</cfquery>
The string that is erroring is this:
<cfqueryparam value="#FORM.ExpirationYear#" cfsqltype="CF_SQL_VARCHAR">
I still get this error. SO It has to be something inside the access database not allowing this null value. It is set as text right now, allowing zero length and not required.
Can anyone help me please?

Hi
Usually the error occurs due to mismatch in datatype of db field and cfsqltype of cfqueryparam. Is "FORM.ExpirationYear " of type date?.
If so <cfqueryparam value="#FORM.ExpirationYear#" cfsqltype="CF_SQL_DATE" null="yes">)
"http://www.adobe.com/livedocs/coldfusion/6.1/htmldocs/tags-b20.htm" (have a look ).
Hope this will solve your issue

Similar Messages

  • How to set table cell renderer in a specific cell?

    how to set table cell renderer in a specific cell?
    i want set a cell to be a button in renderer!
    how to do?
    any link or document can read>?
    thx!

    Take a look at :
    http://www2.gol.com/users/tame/swing/examples/SwingExamples.html
    It is very interesting, and I think your answer is here.
    Denis

  • How to set current year,month as default value in combo box

    hi,  im newbie of xcelsius user
    i realize  that hv a issue that display combo box base on year & month
    let said
    <b><u>step 1</u></b>
    I create excel data like this
    <b><u>year___ </u>  </b>    |     <u><b>month_   </b></u> |     <u><b>Product</b></u> |     <u><b>revenue</b></u>
    02-04-09 |     02-04-09 |       a |     $4,154
    03-04-09 |     03-04-09 |       b |     $6,813
    04-05-09 |     04-05-09 |       a |     $9,875
    05-06-09 |     05-06-09 |       b |     $6,813
    06-04-10 |     06-04-10 |       a |     $6,813
    07-04-10 |     07-04-10 |       b |     $9,875
    08-06-10 |     08-06-10 |       a |     $9,875
    22-06-10 |     22-06-10 |       b |     $6,813
    <u><b>Step2</b></u>
    Then i go format cell to format/custom date to year & month
    Eg1: Year u2013>  02-04-09  convert to u2018YYYYu2019 (2009)
    Eg2: Month u2013>  02-04-09  convert to u2018mmmmu2019 (April)
    So output like this
    <u><b>year</b></u> |     <u><b>month</b></u> |     <u><b>Product</b></u> |     <u><b>revenue </b></u>
    2009 |     April |     a |     $4,154
    2009 |     April |     b |     $6,813
    2009 |     May |     a |     $9,875
    2009 |     June |     b |     $6,813
    2010 |     April |     a |     $6,813
    2010 |     April |     b |      $9,875
    2010 |     June |     a |     $9,875
    2010 |     June |     b |     $6,813
    But the problem is when i insert to combo box,use u201Cfilter Row u201D, i excpectation will display only 2009,2010
    But Actual display the Year  in combo box is duplicated :'(
    so any solution ? and then only how to set current year & month as default value  :'(
    thanks,
    regards
    s1
    Edited by: Leong Pui Kee on Feb 25, 2011 5:25 AM
    Edited by: Leong Pui Kee on Feb 25, 2011 5:36 AM

    hi,
    your created  data
    step 1
    I create excel data like this
    year___ | month_ | Product | revenue
    02-04-09 | 02-04-09 | a | $4,154
    03-04-09 | 03-04-09 | b | $6,813
    04-05-09 | 04-05-09 | a | $9,875
    05-06-09 | 05-06-09 | b | $6,813
    06-04-10 | 06-04-10 | a | $6,813
    07-04-10 | 07-04-10 | b | $9,875
    08-06-10 | 08-06-10 | a | $9,875
    22-06-10 | 22-06-10 | b | $6,813
    In this, year and month both are same data, make the diffent data like year  2009, 2010  And month Jan, Feb, March, ...Etc 
    and also one more check you formulas on month and year, select correct source data, destination data  for compoonent..
    OR
    from above, to create a date column and convert  date-->year, date--> month and Explore it.
    All the best,
    Praveen

  • How to set the cell size in a JFrame

    Hello. Is there any way of setting the cell size in a JFrame. The reason why I want to set the cell size is that I want to be sure of their location that when I am placing components on the JFrame. So is there any way of setting the cell size beforehand. Also for the following code.
    JFrame frame = new JFrame("Window");
    frame.setSize(100,100);is the size 100 by 100 is he size of the cell?

    smithbrian wrote:
    When I am placing a component on the grid I want to be sure the component is exactly where I place it. In order to do that I would need to know what is the size of the gird and how to change the size of the gird in the JFrame.What grid?? You're assuming that we know much more about your program than we actually do. We actually know zip. Please read this help site which will help you to avoid similar errors in posting questions here. It has helped me in the past: [smart questions|http://www.catb.org/~esr/faqs/smart-questions.html]

  • How to set a cell editable at runtime for jtable

    Hi evry body
    i need to set a cell as editable during runtime and set some value for the cell and make it non editable after setting value
    how can i do it? urgent help appreciated
    regards
    anil

    You could override the methods isCellEditable(...) and setValueAt(...) in your JTable's TableModel to get the effect desired
    // Assuming that each element of the array will be false initially
    boolean[][] valueSet = new boolean[noRows][noCols];
    public boolean isCellEditable(int row, int col) {
      return !valueSet[row][col];
    public void setValueAt(Object obj, int row, int col) {
      super.setValueAt(obj, row, col);
      valueSet[row][col] = true;
    }

  • How to set JTable cell editable/non-editable dynamically using NetBean?

    I am using NetBean 6.5, create a database desktop application, I using the persistence entity manager to bind my JTable with database.
    Now, I want to set practicular cells which are enable and disable, I tried to create my own table model and override the isEditable() method, which it seems didn't work. I guessed the problem is the persistence connection between my Table and database.
    How can I solve it? Any example? I just googled the web and can't find example which use netbean combined with database. I know that a single JTable would work when creating your own model.
    thx.

    I know what coding i did, Yes u r right but im new to GUI programming only,
    That's why i posted it to forums, I gone through the Control Flow Statements link what u have given.
    U didnt get my question at all.
    Again the problem im facing is the table is already displayed with 2nd column uneditable.
    When some Action done on table, i need to make 2nd column editable at run time.
    Thanks if u provide me the solution instead of deciding what type of programmer im.

  • JTree: How to set different cell editor for different tree Nodes.

    I have a JTree and I want to set different cell editors for different node depending on some condition. E.g. I want to set ComboBox as editor for leaf node but each leaf node will have its own set of data.
    Any help or pointer?
    Thanks in advance
    Sachin

    take there:
    http://www.mutualinstrument.com/Easy/FAQ/Tree/tree.html

  • How to set JTable cells to uneditable

    I was trying to set the cells in my Jtable to uneditable.
    I overrided the isCellEditable method. Here is what I did. But the
    cells remain editable. Any ideas?
    private class MyTableModel extends DefaultTableModel
    public MyTableModel(Vector vectRow,Vector vecColumn)
    super(vecVector,vecColumn);
    public boolean isCellEditable(int row, int col)
    if (col >= 0) {
    return false;
    }

    Just Use:
    public boolean isCellEditable(int r, int c) { return false; }

  • How to validate if a column have NULL value, dont show a row with MDX

    Hello,
    I have this situation, I have a Result from MDX that return rows with values NULL on columns, I tried with NON EMPTY and NONEMPTY but the result is the same. That I want to do is validate if a column have a Null value discard the row, but I dont know how
    to implement it, could somebody help me?, please.
    Thanks a lot.
    Sukey Nakasima
    Sukey Nakasima

    Hello,
    I found the answer in this link https://social.technet.microsoft.com/Forums/sqlserver/en-US/f9c02ce3-96b2-4cd6-921f-3679eb22d790/dont-want-to-cross-join-with-null-values-in-mdx?forum=sqlanalysisservices
    Thanks a lot.
    Sukey Nakasima
    Sukey Nakasima

  • How to differentiate the EMPTY Records and Null Values in DSO

    Hello....how is everyone here?? Ehehehe!
    I try to load some data from the flat file which contains some EMPTY data and Null Values for the records. The data type for the InfoObjects of the fields "Quantity" is "number". The sample data from the flat file (CSV) are as below:
    Food              Quantity
    Hamburger  -       12
    Cheese        -       0
    Vegetable      -               (Empty)
    When I try to load the above sample data to the DSO, I get the results of the data as follow:
    Food              Quantity
    Hamburger     - 12.000
    Cheese           -  0.000
    Vegetable         - 0.000
    In this case, how can the user differentiate whether the records is contain empty value of null values in DSO? This is kinda of hard to differentiate the both scenarios above. Is there any way to differentiate the scenarios described here?
    Thanks alot =)

    Hi Fluffy,
    It depends on the initial values of the data type
    The inital values For quantity/Currency/ Numbers it takes spaces as 0
    for char it is SPACE
    We cannot differeniate between space and null values.
    IF you have to force this then define quantity as char and load the data. we will not have units and aggregation in this case.
    Hope this helps.
    PV

  • How to set dynamic parameter in list of values in parameter property

    Hi,
    I am using cr4e-all-in-one-win_2.0.1version.I have created .rpt file in that how to set dynamic parameters(from database) in list of values parameter property
    Regards,
    amol

    Hi,
    I am using cr4e-all-in-one-win_2.0.1version.I have created .rpt file in that how to set dynamic parameters(from database) in list of values parameter property
    Regards,
    amol

  • How to set Oracle Data Integrator Timeout paramter value as unlimited

    Hi
    Can any one help me how to set Oracle Data Integrator Timeout (ODI menu>User Paramter>Oracle Data Integrator Timeout > paramter value as unlimited.
    By default it is 30 and i want to change it as unlimited.
    I am connecting linux box through windows using citrix and opened ODI and start the scenario execution (my scenario execution in loop and it will execute continuesly) after execution starts I an logout from citrix (I am not closing ODI) and after some time like 50 min my odi execution is stoped due to timeout.
    my ODI execution should continue in my absence that to unlimited.
    Please help me it is urgent
    Regards,
    Phanikanth

    Thanks Bhabani
    Is it work for unlimited in linux box because I have given operator dispplay limit(0=no limit) as 1000000 and I am unable to see the execution session details on Operator>session list
    later i have changed to 10000 and click on ok and just refreshed and it is working fine
    If I give mensioned below it will not impact on ODI ?
    windows it is working but I have doubt on linux version
    Please help me
    Regards,
    Phanikanth

  • How to use any cell as an static value

    Hello,
    I don't know if it is possible to use any cell as an static value, same as $ in excel, E$2$.
    I need to divide all the values of a table with a unique value of a cell. In excel is when you put $E$2, this make a cell an static value.
    This is possible en Web Intelligence?
    Best Regards
    SU

    Hello Srivatsa,
    Thanks for your response. An example could be the sum and divide by the sum (to calculate participation) of a table.
    2
    2
    3
    S=7
    Then I want to divide 2 by 7, 2 by 7 and 3 by 7. The Sum (in this case 7) is the static value, how can I use it for operate all the registries?
    To have,
    0.29
    0.29
    0.43
    Thanks & Regards
    SU

  • How to set system date as a default value in UIX/XML page?

    Example: We set default values using following statements:
    <set property="inputValue" target="${bindings.PoNumber}" value="${'1234'}"/>
    <set property="inputValue" target="${bindings.UserName}" value="${param.MyParam1}"/>
    In JDeveloper Help, we cannot find a way to set a Date attribute's default value to today's (system) date. Any suggestions?
    Also, does anyone have a reccomendation on a good book for uix/xml?
    Thanks, Ali.

    bump

  • IW31 how to set functional area as a default value?

    Dear all:
    Can anyone guide me, is any way to set "functional area" as a default value (t-code iw31 Additional Data -> Functional area)?
    Thanks in advance.

    Hello ,
    The standard funtionality is set to default the Functional Area from the Order Type.  I believe it is possible to change the default value for the Functional Area in Transaction KOT2. The PM order types should be selectable in this transaction.
    I hope this information has been helpful.
    Best Regards,
    Frank

Maybe you are looking for