Placing null values in the database

Hi
I'm using a PreparedStatement object to try to input a null value in the database. I'm using the following code :
pstmt = connection.prepareStatement("INSERT INTO Conditions (Deal,ConditionDate,Condition ) VALUES (?,?,?)");
pstmt.setString(1,"aDealName");
pstmt.setNull(2,Types.TIMESTAMP);
pstmt.setString(3,"aCondition");
pstmt.executeUpdate();
and I get the "SQL Data type out of range" error message.
Does anyone know what might be the problem?
Thanks for any help
LGS

Hi
Sorry for the lack of info.
I am using Microsoft Access 2000, the JDBC-ODBC driver v.4.00.6019
and my TableModel class is as follows:
public class MyTableModel2 extends AbstractTableModel
private Connection conn;
private Vector rows,columnHeads,firstColumn,columnTypes,columnWidths;
private Validation validate;
private String query;
private int numColumns;
String tableType;
String [] columnNamesFrontPage = {"Deal","Spread","Next Event Date","Closing Date"};
String [] columnNamesCommentsPage  = {"Date","Input By","Spread","Comment"};
String [] columnNamesTimetable = {"Date","Event"};
String [] columnNamesConditionsTable = {"Date","Condition"};
private DBase2 db2;
private String tableName,primKeyColName;
public MyTableModel2 ()
{} //Empty Constructor
public MyTableModel2 ( Connection dbConn,String aQuery,String table)
  conn = dbConn;
  rows = new Vector();
  columnHeads = new Vector();
  query = aQuery;
  tableType = table;
  firstColumn = new Vector();
  db2 = new DBase2 (dbConn);
  columnTypes = new Vector();
  columnWidths = new Vector();
  validate = new Validation();
}//End of Constructor
public int getColumnCount ()
  return columnHeads.size();
}//End of Method
public int getRowCount ()
  return rows.size();
}//End of Method
public Object getValueAt(int aRow, int aColumn)
  Vector row = (Vector)rows.elementAt(aRow);
  return row.elementAt(aColumn);
}//End of Method
public String getColumnName (int column)
  String columnName = "";
  if(tableType == null)
   columnName = columnHeads.get(column).toString();
  else if (tableType == "FrontPage")
   columnName = columnNamesFrontPage [column];
  else if (tableType == "CommentsPage")
   columnName = columnNamesCommentsPage [column];
  else if (tableType == "Timetable")
   columnName = columnNamesTimetable [column];
  else if (tableType == "ConditionsTable")
   columnName = columnNamesConditionsTable [column];
  return columnName;
}//End of Method
public void query() 
  try {
   Statement statement = conn.createStatement();
   ResultSet rs = statement.executeQuery(query);
   ResultSetMetaData rsmd = rs.getMetaData();
   tableName = rsmd.getTableName(1);
   Integer i2;
   boolean moreRecords = rs.next();
   for (int i = 1; i <= rsmd.getColumnCount(); ++i)
     if (i == 1)
      primKeyColName = rsmd.getColumnName(i);
     else
      columnHeads.addElement(rsmd.getColumnName(i));
      if (rsmd.getColumnTypeName(i).equals("DATETIME"))
       i2 = new Integer (8);
      else
       int i1 = rsmd.getColumnDisplaySize(i);
       i2 = new Integer (i1);
      columnWidths.add(i2);
      String colTypeName = rsmd.getColumnTypeName(i);
      columnTypes.addElement(colTypeName);
      //JOptionPane.showMessageDialog(null,"Column Width="+i2,"Column Types  ",JOptionPane.INFORMATION_MESSAGE);
   do {
      rows.addElement( getNextRow (rs,rsmd));
   while (rs.next() );
  catch ( SQLException sqlex )
    sqlex.printStackTrace();
  }//End of Method
private Vector getNextRow( ResultSet rs, ResultSetMetaData rsmd )
       throws SQLException
    Vector currentRow = new Vector();
     for ( int i = 1; i <= rsmd.getColumnCount(); ++i )
       Object o = rs.getObject(i);
       if (o == null)
         String emptyCell = "";
         currentRow.addElement(emptyCell);
       else if(o.getClass().toString().equalsIgnoreCase("class java.sql.Timestamp") )
         SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yy");
         String formatted = sdf.format(o);
         currentRow.addElement(formatted);
       else
         if (i == 1)
          firstColumn.addElement(o);
         else
         currentRow.addElement(o);
      return currentRow;
    }//End of Method
public void refresh ()
  rows.clear();
  firstColumn.clear();
  try {
   Statement statement = conn.createStatement();
   ResultSet rs = statement.executeQuery(query);
   ResultSetMetaData rsmd = rs.getMetaData();
   boolean moreRecords = rs.next();
   do {
      rows.addElement( getNextRow (rs,rsmd));
   while (rs.next() );
  catch ( SQLException sqlex )
    sqlex.printStackTrace();
  this.fireTableDataChanged();
}//End of Method
public boolean isCellEditable (int row, int col)
  return true;
}//End of Class
public void setValueAt(Object value, int row, int col)
   String objToString = value.toString();
   int columnWidth = Integer.parseInt(columnWidths.elementAt(col).toString());
   if(objToString.length() > columnWidth)
    validate.errorMessageDisplay("Maximum column width is "+columnWidth+" characters - Please retype","INPUT ERROR");
   else if (columnTypes.elementAt(col).toString().equals("DATETIME") && validate.validDateInput(objToString) == false)
    validate.errorMessageDisplay("Date is required in form dd/mm/yy - Please retype","INPUT ERROR");
   else if (columnTypes.elementAt(col).toString().equals("DOUBLE") && validate.validNumberInput(objToString) == false)
    validate.errorMessageDisplay("This column will accept numbers only - Please retype","INPUT ERROR");
   else
   //JOptionPane.showMessageDialog(null,columnTypes.elementAt(col).toString(),"Column Name  ",JOptionPane.INFORMATION_MESSAGE);
   Vector rowA = (Vector)rows.elementAt(row);
   rowA.setElementAt(value,col);
   fireTableCellUpdated(row, col);
   String newInput = value.toString();
   int id = Integer.parseInt(firstColumn.elementAt(row).toString());
   String colName = columnHeads.elementAt(col).toString();
   String query = "UPDATE "+tableName+" SET "+colName+" = '"+newInput+"' WHERE "+primKeyColName+" = "+id+"";
   db2.modifyDatabase(query);
   refresh();
  }//End of Method The method in which I am using PreparedStatement is:
public void updateConditionsTable (String aDealName, String aCondition) 
   int result = 0;
   try
    pstmt = connection.prepareStatement("INSERT INTO Conditions (Deal,ConditionDate,Condition )"+
    " VALUES (?,?,?)");
   // pstmt = connection.prepareStatement("INSERT INTO Conditions (Deal,ConditionDate,Condition )"+
   // " VALUES (?,?,?)");
    pstmt.setString(1,aDealName);
    pstmt.setNull(2,Types.INTEGER);
    pstmt.setString(3,aCondition);
    pstmt.executeUpdate();
   catch (SQLException sqlex ) {
     //sqlex.printStackTrace();
     String output = "YOUR INPUT IS NOT VALID - PLEASE TRY AGAIN\n";
     output = output + sqlex.toString();
     JOptionPane.showMessageDialog(null,output,"SQL Error",JOptionPane.INFORMATION_MESSAGE);
    //return result;
   }//Closes Method Once again, thanks for any help

Similar Messages

  • Need help Take out the null values from the ResultSet and Create a XML file

    hi,
    I wrote something which connects to Database and gets the ResultSet. From that ResultSet I am creating
    a XML file. IN my program these are the main two classes Frame1 and ResultSetToXML. ResultSetToXML which
    takes ResultSet & Boolean value in its constructor. I am passing the ResultSet and Boolean value
    from Frame1 class. I am passing the boolean value to get the null values from the ResultSet and then add those
    null values to XML File. When i run the program it works alright and adds the null and not null values to
    the file. But when i pass the boolean value to take out the null values it would not take it out and adds
    the null and not null values.
    Please look at the code i am posing. I am showing step by step where its not adding the null values.
    Any help is always appreciated.
    Thanks in advance.
    ============================================================================
    Frame1 Class
    ============
    public class Frame1 extends JFrame{
    private JPanel contentPane;
    private XQuery xQuery1 = new XQuery();
    private XYLayout xYLayout1 = new XYLayout();
    public Document doc;
    private JButton jButton2 = new JButton();
    private Connection con;
    private Statement stmt;
    private ResultSetToXML rstx;
    //Construct the frame
    public Frame1() {
    enableEvents(AWTEvent.WINDOW_EVENT_MASK);
    try {
    jbInit();
    catch(Exception e) {
    e.printStackTrace();
    //Component initialization
    private void jbInit() throws Exception {
    //setIconImage(Toolkit.getDefaultToolkit().createImage(Frame1.class.getResource("[Your Icon]")));
    contentPane = (JPanel) this.getContentPane();
    xQuery1.setSql("");
    xQuery1.setUrl("jdbc:odbc:SCANODBC");
    xQuery1.setUserName("SYSDBA");
    xQuery1.setPassword("masterkey");
    xQuery1.setDriver("sun.jdbc.odbc.JdbcOdbcDriver");
    contentPane.setLayout(xYLayout1);
    this.setSize(new Dimension(400, 300));
    this.setTitle("Frame Title");
    xQuery1.setSql("Select * from Pinfo where pid=2 or pid=4");
    jButton2.setText("Get XML from DB");
    try {
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    catch(java.lang.ClassNotFoundException ex) {
    System.err.print("ClassNotFoundException: ");
    System.err.println(ex.getMessage());
    try {
    con = DriverManager.getConnection("jdbc:odbc:SCANODBC","SYSDBA", "masterkey");
    stmt = con.createStatement();
    catch(SQLException ex) {
    System.err.println("SQLException: " + ex.getMessage());
    jButton2.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(ActionEvent e) {
    jButton2_actionPerformed(e);
    contentPane.add(jButton2, new XYConstraints(126, 113, -1, -1));
    //Overridden so we can exit when window is closed
    protected void processWindowEvent(WindowEvent e) {
    super.processWindowEvent(e);
    if (e.getID() == WindowEvent.WINDOW_CLOSING) {
    System.exit(0);
    void jButton2_actionPerformed(ActionEvent e) {
    try{
    OutputStream out;
    XMLOutputter outputter;
    Element root;
    org.jdom.Document doc;
    root = new Element("PINFO");
    String query = "SELECT * FROM PINFO WHERE PID=2 OR PID=4";
    ResultSet rs = stmt.executeQuery(query);
    /*===========This is where i am passing the ResultSet and boolean=======
    ===========value to either add the null or not null values in the file======*/
    rstx = new ResultSetToXML(rs,true);
    } //end of try
    catch(SQLException ex) {
    System.err.println("SQLException: " + ex.getMessage());
    ======================================================================================
    ResultSetToXML class
    ====================
    public class ResultSetToXML {
    private OutputStream out;
    private Element root;
    private XMLOutputter outputter;
    private Document doc;
    // Constructor
    public ResultSetToXML(ResultSet rs, boolean checkifnull){
    try{
    String tagname="";
    String tagvalue="";
    root = new Element("pinfo");
    while (rs.next()){
    Element users = new Element("Record");
    for(int i=1;i<=rs.getMetaData().getColumnCount(); ++i){
    tagname= rs.getMetaData().getColumnName(i);
    tagvalue=rs.getString(i);
    System.out.println(tagname);
    System.out.println(tagvalue);
    /*============if the boolean value is false it adds the null and not
    null value to the file =====================*/
    /*============else it checks if the value is null or the length is
    less than 0 and does the else clause in the if(checkifnull)===*/
    if(checkifnull){ 
    if((tagvalue == null) || tagvalue.length() < 0 ){
    users.addContent((new Element(tagname).setText(tagvalue)));
    else{
    users.addContent((new Element(tagname).setText(tagvalue)));
    else{
    users.addContent((new Element(tagname).setText(tagvalue)));
    root.addContent(users);
    out=new FileOutputStream("c:/XMLFile.xml");
    doc = new Document(root);
    outputter = new XMLOutputter();
    outputter.output(doc,out);
    catch(IOException ioe){
    System.out.println(ioe);
    catch(SQLException sqle){

    Can someone please help me with this problem
    Thanks.

  • How can I get null values for the later weeks

    Hi All,
    When I execute this code I get the records till current week.
    How can I display the output so that I get null values for the later weeks. (with the help of v_numOfWeeks variable in the code)
    Thanks,
    Vikram
    DECLARE
       v_query VARCHAR2(4000);
       TYPE ref_cursor IS REF CURSOR;
       v_refcur ref_cursor;
       v_sum NUMBER;
       v_id NUMBER;
       v_name VARCHAR2(1000);
       v_weeknum NUMBER;
       v_pernum NUMBER;
       v_numOfWeeks NUMBER := 5;
    BEGIN
    v_query := ' SELECT SUM(product_bkg), postn_id, postn_tbl.postn_name, b.week_num, b.period_num
                              FROM ops_cv_extract b, (SELECT row_id, desc_text postn_name
                          FROM s_postn) postn_tbl
                          WHERE lvl_6_id = 5767
                          AND fiscal_year = 2008
                          AND b.week_num < 4
                          AND b.period_num = 3
                          AND b.postn_id = TO_NUMBER(postn_tbl.row_id)
                          GROUP BY postn_id, postn_tbl.postn_name, b.week_num, b.period_num
                          ORDER BY  postn_tbl.postn_name, b.week_num';
    OPEN v_refcur FOR v_query;
    LOOP
       FETCH v_refcur INTO v_sum, v_id, v_name, v_weeknum, v_pernum;
       EXIT WHEN v_refcur%notfound;
       dbms_output.put_line('P'|| v_pernum||'W'|| v_weeknum||' '||v_name||' '||v_sum);
    END LOOP;
    END;
    This is the output when I execute this code.
    P3W1 COMM CNTRL ISAM 213 26961.61
    P3W2 COMM CNTRL ISAM 213 12870.4
    P3W3 COMM CNTRL ISAM 213 245.88
    P3W1 COMM CNTRL ISAM 273 72831.2
    P3W2 COMM CNTRL ISAM 273 8739.38
    P3W3 COMM CNTRL ISAM 273 3764.92
    P3W1 COMM CNTRL TAM 213 49844
    P3W2 COMM CNTRL TAM 213 20515.17
    P3W3 COMM CNTRL TAM 213 16167.46
    P3W2 COMM CNTRL TAM 216 12561.4
    P3W3 COMM CNTRL TAM 216 2027.1
    P3W1 COMM CNTRL TAM 273 -3336.71
    P3W2 COMM CNTRL TAM 273 -1376.68
    P3W3 COMM CNTRL TAM 273 19707.42
    P3W1 Damon Walters -609.07
    P3W2 Damon Walters 30030.24
    P3W3 Damon Walters 37475.1
    This is the output I'd like to get
    P3W1 COMM CNTRL ISAM 213 26961.61
    P3W2 COMM CNTRL ISAM 213 12870.4
    P3W3 COMM CNTRL ISAM 213 245.88
    P3W4 COMM CNTRL ISAM 213
    P3W5 COMM CNTRL ISAM 213
    P3W1 COMM CNTRL ISAM 273 72831.2
    P3W2 COMM CNTRL ISAM 273 8739.38
    P3W3 COMM CNTRL ISAM 273 3764.92
    P3W4 COMM CNTRL ISAM 273
    P3W5 COMM CNTRL ISAM 273
    P3W1 COMM CNTRL TAM 213 49844
    P3W2 COMM CNTRL TAM 213 20515.17
    P3W3 COMM CNTRL TAM 213 16167.46
    P3W4 COMM CNTRL TAM 213
    P3W5 COMM CNTRL TAM 213
    P3W1 COMM CNTRL TAM 273 -3336.71
    P3W2 COMM CNTRL TAM 273 -1376.68
    P3W3 COMM CNTRL TAM 273 19707.42
    P3W4 COMM CNTRL TAM 273
    P3W5 COMM CNTRL TAM 273
    P3W1 Damon Walters -609.07
    P3W2 Damon Walters 30030.24
    P3W3 Damon Walters 37475.1
    P3W4 Damon Walters
    P3W5 Damon Walters Edited by: polasa on Oct 28, 2008 6:42 PM

    Sure, in a Single SQL ->
    satyaki>
    satyaki>select * from v$version;
    BANNER
    Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Prod
    PL/SQL Release 10.2.0.3.0 - Production
    CORE    10.2.0.3.0      Production
    TNS for 32-bit Windows: Version 10.2.0.3.0 - Production
    NLSRTL Version 10.2.0.3.0 - Production
    Elapsed: 00:00:00.01
    satyaki>
    satyaki>
    satyaki>-- Start Of Test Data --
    satyaki>with week_tab
      2  as
      3    (
      4      select 1 period_num, 1 week_num, 10 bkg1 from dual
      5      union all
      6      select 1, 2, 40 from dual
      7      union all
      8      select 1, 3, 30 from dual
      9      union all
    10      select 1, 2, 20 from dual
    11      union all
    12      select 1, 1, 10 from dual
    13      union all
    14      select 1, 1, 20 from dual
    15      union all
    16      select 1, 3, 10 from dual
    17      union all
    18      select 2, 1, 15 from dual
    19      union all
    20      select 2, 2, 20 from dual
    21      union all
    22      select 2, 3, 10 from dual
    23      union all
    24      select 2, 1, 15 from dual
    25      union all
    26      select 2, 2, 30 from dual
    27      union all
    28      select 2, 3, 20 from dual
    29    )
    30  -- End Of Test Data --
    31  select period_num,
    32         week_num,
    33         (
    34            select sum(week_tab.bkg1)
    35            from week_tab
    36            where period_num = m.period_num
    37            and   week_num   = m.week_num
    38            group by week_num, period_num
    39         ) sum_bkg1
    40  from (
    41        select dum.week_num,
    42              wk.period_num
    43        from (
    44                select 1 week_num from dual
    45                union all
    46                select 2 from dual
    47                union all
    48                select 3 from dual
    49                union all
    50                select 4 from dual
    51                union all
    52                select 5 from dual
    53              ) dum ,
    54              (
    55                select distinct period_num
    56                from week_tab
    57          ) wk
    58      ) m;
    PERIOD_NUM   WEEK_NUM   SUM_BKG1
             1          1         40
             1          2         60
             1          3         40
             1          4
             1          5
             2          1         30
             2          2         50
             2          3         30
             2          4
             2          5
    10 rows selected.
    Elapsed: 00:00:00.48
    satyaki>Regards.
    Satyaki De.

  • Storing NULL Value in Mysql database

    Hi all,
    Can anybody help me ? How can I store a NULL value in my Mysql database file using JSP.
    I have got a blank input from the user's form but in place of blank I want to store NULL value in my database.
    What should i do ?
    Thanks for any help in advance.
    regards
    savdeep

    http://java.sun.com/j2se/1.4.2/docs/api/java/sql/PreparedStatement.html#setNull(int,%20int)

  • Sending the Value to the database of the selected item in the radioButton

    I want to pass  the value to the database that I selected on the radioButton
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
         <mx:Text y="36" text="The Christian and Missionary Alliance Churches of the Philippines, Inc" width="581" fontWeight="bold" fontSize="15" horizontalCenter="46"/>
         <mx:Text y="59" text="( C A M A C O P)" fontWeight="bold" fontSize="12" horizontalCenter="8"/>
         <mx:Text y="77" text="MEMBERSHIP IDENTIFICATION FORM" width="502" fontSize="17" fontWeight="bold" textAlign="center" horizontalCenter="0"/>
         <mx:Text y="101" text="Date: " width="47" fontWeight="bold" textAlign="center" horizontalCenter="-71"/>
         <mx:DateField y="99" id="dateToday" horizontalCenter="18" editable="true" width="140" enabled="true"/>
         <mx:Label y="153" text="District:" fontWeight="bold" horizontalCenter="-418"/>
         <mx:TextInput y="151" maxChars="15" id="district" width="249" enabled="true" horizontalCenter="-260"/>
         <mx:Text y="179" text="Name of Local Church:" fontWeight="bold" horizontalCenter="-378"/>
         <mx:TextInput y="177" width="400" id="nameLocalChurch" maxChars="255" enabled="true" horizontalCenter="-104"/>
         <mx:Text y="205" text="Local Church Address:" fontWeight="bold" horizontalCenter="-378"/>
         <mx:TextInput y="203" width="401" id="addressLocalChurch" maxChars="255" enabled="true" horizontalCenter="-105"/>
         <mx:Text y="231" text="Name:" fontWeight="bold" horizontalCenter="-422"/>
         <mx:TextInput y="229" width="489" id="givenName" maxChars="255" enabled="true" horizontalCenter="-149"/>
         <mx:Text y="254" text="(Given Name/Middle Name/Family Name - CAPITALIZE)" fontStyle="italic" horizontalCenter="-158"/>
         <mx:Text y="284" text="Position in the Church: " fontWeight="bold" horizontalCenter="-376"/>
         <mx:TextInput y="276" width="401" id="posInChurch" maxChars="225" enabled="true" horizontalCenter="-105"/>
         <mx:Text y="310" text="Profession/Title:" fontWeight="bold" horizontalCenter="-393"/>
         <mx:TextInput y="306" width="434" id="professionTitle" maxChars="225" enabled="true" horizontalCenter="-121"/>
         <mx:Text y="333" text="Community Involvement/Work" fontWeight="bold" horizontalCenter="-351"/>
         <mx:Text y="355" text="Gift Skill:" fontWeight="bold" horizontalCenter="-415"/>
         <mx:TextInput y="353" width="475" enabled="true" horizontalCenter="-142" id="giftSkill" maxChars="225"/>
         <mx:Text y="381" text="Home Address:" fontWeight="bold" horizontalCenter="-397"/>
         <mx:TextInput y="379" width="448" id="homeAddress" enabled="true" horizontalCenter="-128" maxChars="225"/>
         <mx:Text y="406" text="Status:" fontWeight="bold" horizontalCenter="-420"/>
         <mx:Text y="432" text="Date of Marriage:" fontWeight="bold" horizontalCenter="-391"/>
         <mx:TextInput y="430" enabled="true" id="dateOfMarriage" horizontalCenter="-258" maxChars="225"/>
         <mx:Text y="432" text="(If Married)" fontWeight="normal" fontStyle="italic" horizontalCenter="-144"/>
         <mx:Text y="458" text="Tel./Cell Phone:" fontWeight="bold" horizontalCenter="-396"/>
         <mx:TextInput y="456" width="436" id="cell" enabled="true" horizontalCenter="-122" maxChars="225"/>
         <mx:Text y="484" text="SSS/GSIS No." fontWeight="bold" horizontalCenter="-402"/>
         <mx:TextInput y="482" width="215" id="sss" enabled="true" maxChars="15" horizontalCenter="-243"/>
         <mx:Label y="484" text="Blood Type" fontWeight="bold" horizontalCenter="-94"/>
         <mx:TextInput y="482" width="154" id="bloodType" enabled="true" maxChars="15" horizontalCenter="19"/>
         <mx:Text y="509" text="Height" fontWeight="bold" horizontalCenter="-421"/>
         <mx:Text y="510" text="Weight" fontWeight="bold" horizontalCenter="-279"/>
         <mx:TextInput y="508" id="weight" enabled="true" maxChars="15" horizontalCenter="-168"/>
         <mx:Text y="510" text="Birthday" fontWeight="bold" horizontalCenter="-53"/>
         <mx:Text y="536" text="TIN No." fontWeight="bold" horizontalCenter="-420"/>
         <mx:TextInput y="534" id="tin" enabled="true" horizontalCenter="-311" maxChars="225"/>
         <mx:Text y="536" text="Date of Baptism" fontWeight="bold" horizontalCenter="-174"/>
         <mx:Text y="536" text="(If Baptized)" fontStyle="italic" horizontalCenter="32"/>
         <mx:Text y="573" text="Annual Income:" fontWeight="bold" height="18" fontSize="13" horizontalCenter="-384"/>
         <mx:RadioButton y="563" label="Below 10K" id="first" enabled="true" horizontalCenter="-276" groupName="annualIncome"/>
         <mx:RadioButton y="593" label="76k-100k" id="fifth" enabled="true" horizontalCenter="-192" groupName="annualIncome"/>
         <mx:RadioButton y="563" label="11k-20k" id="second" enabled="true" horizontalCenter="-195" selected="false" groupName="annualIncome"/>
         <mx:RadioButton y="563" label="21k-40k" id="third" enabled="true" horizontalCenter="-116" selected="false" groupName="annualIncome"/>
         <mx:RadioButton y="593" label="101k-above" id="sixth" enabled="true" horizontalCenter="-106" groupName="annualIncome"/>
         <mx:RadioButton y="593" label="41k-75k" id="fourth" enabled="true" horizontalCenter="-280" groupName="annualIncome"/>
         <mx:Text y="589" text="(The &quot;k&quot; = thousand)" horizontalCenter="-383" fontStyle="italic"/>
         <mx:TextInput y="508" id="hayt" enabled="true" width="76" horizontalCenter="-356" maxChars="15"/>
         <mx:Text text="In case of Emergency Please Notify" fontSize="12" fontWeight="bold" horizontalCenter="-326" y="621"/>
         <mx:Text y="642" text="Name:" fontWeight="bold" horizontalCenter="-370"/>
         <mx:TextInput y="640" id="EName" enabled="true" width="446" horizontalCenter="-125" maxChars="225"/>
         <mx:Text y="668" text="Address:" fontWeight="bold" horizontalCenter="-363"/>
         <mx:TextInput y="666" width="434" id="EAddress" enabled="true" horizontalCenter="-117" maxChars="225"/>
         <mx:Text y="740" text="Endorsement/Signature of PASTOR" fontWeight="bold" fontSize="12" horizontalCenter="-298"/>
         <mx:Text y="740" text="Signature of Member" fontWeight="bold" fontSize="12" width="208" horizontalCenter="55"/>
         <mx:Text y="804" text="Endorsement/Signature of DMS" fontWeight="bold" fontSize="12" horizontalCenter="-310"/>
         <mx:Text y="806" text="Confirmation of the BISHOP/PRESIDENT" fontWeight="bold" fontSize="12" horizontalCenter="88"/>
         <mx:Text y="867.7" text="Reminders" fontSize="15" fontWeight="bold" horizontalCenter="-76"/>
         <mx:Text y="899.25" text="Pastor/CMT shall verify each filled up membership form." fontWeight="bold" textAlign="center" fontSize="12" horizontalCenter="-86"/>
         <mx:Text y="921.8" text="The pastor will endorse the forms to their respective DMS." fontWeight="bold" fontSize="12" textAlign="center" horizontalCenter="-78"/>
         <mx:Text y="942.35" text="The donation for I.D. is 50.00php." fontWeight="bold" textAlign="center" fontSize="12" horizontalCenter="-62"/>
         <mx:Text y="961.9" text="Get your receipts from the DMS as a whole." fontWeight="bold" textAlign="center" fontSize="12" horizontalCenter="-69"/>
         <mx:Text y="980.35" text="Check carefully the neatness of I.D. pictures." fontWeight="bold" fontSize="12" textAlign="center" horizontalCenter="-64"/>
         <mx:Text y="997.9" text="This form is to be completed by all CAMACOP members and workers." fontWeight="bold" fontSize="12" horizontalCenter="-83"/>
         <mx:Spacer x="47" y="9"/>
         <mx:Button y="1034" label="Submit" id="submit" enabled="true" horizontalCenter="-89" click = "sample1.send()"/>
         <mx:DateField y="508" id="birthday" enabled="true" horizontalCenter="35" width="122"/>
         <mx:DateField y="534" width="105" id="dateOfBaptism" enabled="true" horizontalCenter="-64"/>
         <mx:RadioButtonGroup id="work"/>
         <mx:RadioButton x="273" y="331" label="Private" groupName="work" width="80" id="prayvate" enabled="true"/>
         <mx:RadioButton x="416" y="331" label="NGO" groupName="work" enabled="true" id="NGO"/>
         <mx:RadioButton x="359" y="331" label="GO" groupName="work" enabled="true" id="GO"/>
         <mx:RadioButtonGroup id="status"/>
         <mx:RadioButton x="133" y="404" label="Married" groupName="status" id="Married"/>
         <mx:RadioButton x="207" y="404" label="Single" groupName="status" id="Single"/>
         <mx:RadioButton x="274" y="404" label="Widow" groupName="status" id="Widow"/>
         <mx:RadioButton x="342" y="404" label="Widower" groupName="status" id="Widower"/>
         <mx:HTTPService id="sample1" method="POST" url="http://localhost/frontPage-debug/add.php">
              <mx:request xmlns="">
                   <dateToday>
                        {dateToday.text}
                   </dateToday>
                   <district>
                        {district.text}
                   </district>
                   <nameLocalChurch>
                        {nameLocalChurch.text}
                   </nameLocalChurch>
                   <addressLocalChurch>
                        {addressLocalChurch.text}
                   </addressLocalChurch>
                   <givenName>
                        {givenName.text}
                   </givenName>
                   <posInChurch>
                   {posInChurch.text}
                   </posInChurch>
                   <professionTitle>
                   {professionTitle.text}
                   </professionTitle>
                   <work>
                        {work.text}
                   </work>
                   <giftSkill>
                        {giftSkill.text} <!--THIS IS WHERE THE ERROR HAPPENS-->
                   </giftSkill>
                   <homeAddress>
                        {homeAddress.text}
                   </homeAddress>
                   <status>
                        {status.text} <!--THIS IS WHERE THE ERROR HAPPENS-->
                   </status>
                   <dateOfMarriage>
                        {dateOfMarriage.text}
                   </dateOfMarriage>
                   <cell>
                        {cell.text}
                   </cell>
                   <bloodType>
                        {bloodType.text}
                   </bloodType>
                   <sss>
                        {sss.text}
                   </sss>
                   <weight>
                        {weight.text}
                   </weight>
                   <birthday>
                        {birthday.text}
                   </birthday>
                   <tin>
                        {tin.text}
                   </tin>
                   <dateOfBaptism>
                        {dateOfBaptism.text}
                   </dateOfBaptism>
                   <annualIncome>
                        {annualIncome.text}          
                   </annualIncome>
                   <EName>
                        {EName.text}
                   </EName>
                   <EAddress>
                        {EAddress.text}
                   </EAddress>
              </mx:request>     
         </mx:HTTPService>     
    </mx:Application>
    This is are the errors
    1119: Access of possibly undefined property text through a reference with static type mx.controls:RadioButtonGroup.  
    1120: Access of undefined property annualIncome.

    Hi,
    instead of
    {status.text}
    should be {status.selection.label} (status.selection is a RadioButton or null and after that you can get label property). It's better to set one of the variants in radioButtonGroup to selected and do not check null selection or selectedValue property.
    It seems that {giftSkill.text} is ok, but {work.text} above it has the same problem as I've described above.

  • Initial value and value in the database

    Hello world ,
    i want to add initial value with value in the database depend on the date
    for example i have initial value for 30/09/2009
    i and to all it with value in the database in 31/12/2009
    take a look what i did
    PROCEDURE pkd_prem IS
    cursor gr_pkd_prem is select
    SUM(DECODE(mark,'01',FM_mark,TM_mark) A,
    SUM(DECODE(FMS,'01',LS,NS) b
    from fr_treaty_profile ftp, fr_monthly_summary
    where
    (ftp.tpr_cgp_id = fr_monthly_summary.fms_cgp_id )
    AND (ftp.tpr_cmp_id = fr_monthly_summary.fms_cmp_id )
    AND (ftp.tpr_treaty_origin = fr_monthly_summary.fms_treaty_origin )
    AND (ftp.tpr_uw_year = fr_monthly_summary.fms_uw_year )
    AND (ftp.tpr_class = fr_monthly_summary.fms_class )
    AND (ftp.tpr_type = fr_monthly_summary.fms_type )
    AND (ftp.tpr_serial = fr_monthly_summary.fms_serial )
    AND
    (fr_monthly_summary.fms_treaty_origin=:BLK1.EO_ORIGIN) AND
    (fr_monthly_summary.fms_uw_year=:BLK1.EO_UW_YEAR) AND
    (fr_monthly_summary.fms_class=:BLK1.EO_CLASS) AND
    (fr_monthly_summary.fms_treaty_type=:BLK1.EO_TYPE) AND
    ( fr_monthly_summary.fms_treaty_serial=:BLK1.EO_SERIAL)
    AND (FMS_TYPE ='P')
    AND FMS_SERIAL = '01'
    AND (FMS_OFC_ID !='X')
    and (FMS_YEAR =substr(to_char(:BLK1.EO_TRNX_DATE,'DD/MM/YYYY'),7,4))
    and (FMS_PERIOD between substr(to_char(:BLK1.EO_TRNX_DATE,'DD/MM/YYYY'),4,2)-2 and substr(to_char(:BLK1.EO_TRNX_DATE,'DD/MM/YYYY'),4,2)) ;
    ---Initial value
    cursor base is select EO_GR_BKD_PREM from FR_EN
    where
    EO_TREATY_ORIGIN=:BLK1.EO_ORIGIN AND
    EO_UW_YEAR=:BLK1.EO_UW_YEAR AND
    EO_CLASS=:BLK1.EO_CLASS AND
    EO_TREATY_TYPE=:BLK1.EO_TYPE AND
    EO_TREATY_SERIAL=:BLK1.EO_SERIAL AND
    EO_YEAR=:BLK1.EO_YEAR;
    A number(18,3);
    B number(18,3);
    v_base number(18,3);
    BEGIN
    open base;
    open gr_pkd_prem;
    fetch gr_pkd_prem into a,b;
    fetch base into v_base;
    :BLK1.EO_GR_BKD_PREM :=nvl(a,0)+ nvl(b,0)+ nvl(v_base,0);
    close gr_pkd_prem;
    close base;
    END;
    the proceudre is correct and the values come as i want
    but here
    FMS_PERIOD between substr(to_char(:BLK1.EO_TRNX_DATE,'DD/MM/YYYY'),4,2)-2 and substr(to_char(:BLK1.EO_TRNX_DATE,'DD/MM/YYYY'),4,2))
    suppose i will add from 6 to 9
    the value will come down to add with base value
    but next time i want from 10 to 12
    it will add value 10 to 12 with the base for just period 10 to 12
    i want to keep adding
    if i start from 6 to 9
    then shoud be
    add the value of 6 to 9 to 10 to 12
    but

    look ..
    i created a form and let's say there is one field called Base ..
    and i inert value on that field and saved .
    then
    i created cursor to fetch value from another table
    that value which i fetched from another table must add to past value
    take this scenario
    i started with value 6
    then i fetch by cursor value from 1/1/2010 to 31/3/2010 and that value = 33
    first action
    6+33
    then
    i fecth by using cursor from 1/6/2010 to 30/9/2010 and that value = 2
    the result of first action must add with the last value which is 2
    (6+33) from first action plus(+) 2 and display the result on the secreen

  • Passing  null values to the attributes of a CAF operation

    Hi,
    In CAF I am trying to fetch data through Web Service. For this I need to pass null value for the attributes of the operation.If I set the value to null it gives me missing parameter as the error.
    Can anyone tell me how to pass null values to the attributes of a CAF operation?

    Hi Xavier,
    Declare the two variables of type if_wd_contex_node for e.g. lv_node and if_wd_context_element for e.g. lv_element. Now in the first one lets say lv_node get the refrence of dynamically created node like:
    lv_node = wd_context->get_child_node('<node name>').
    Then get the refrence of element like:
    lv_element = lv_node->get_element( ). (You can also pass index as parameter check the method API)
    then just set the value of attribute you want like:
    lv_element->set_attribute( exporting name = '<attribute name>' value = '<your value>').
    Regards,
    Neha

  • Error while inserting BLOB value in the database

    I am trying to insert a BLOB value in the database. This action results in the following exception:
    java.sql.SQLException: ORA-22925: operation would exceed maximum size allowed for a LOB value
    The method i am using is as follows:
    public void insertBlob(Connection Con, StringBuffer Message)throws SQLException
    String Query = "INSERT INTO MSGBLOCKS (MSGDB_ID, MSGBLOCKTYPE, MESSAGE) VALUES (20, 1 , ?)";
    PreparedStatement PS = Con.prepareStatement(Query);
    byte[] bytes = new String(Message).getBytes();
    ByteArrayInputStream bi = new ByteArrayInputStream(bytes);
    PS.setBinaryStream(1, bi, bytes.length);
    PS.executeUpdate();
    The manifest file of ojdbc14.jar being used is: 10.1.0.5.0 and I am using jdk 1.4.
    Also the message being tried to insert is of 9 Kb only.
    Any help would be greatly appreciated.
    Thanks!!!

    Did you check if the Message is having only that small 9kb of data? also check the maximum allowed size for that column in the Oracle DB, the size can be restricted to 8Kb also.
    Edited by: DynamicBasics on Jul 28, 2010 5:54 PM

  • How do I pass a null value to the reportDocument?

    I'm using CR 2008 and VS 2005. 
    I am using a stored procedure as the datasource for one of my report, which we run using the C# API.   The stored procedure is expecting a NULL in certain cases and I find I cannot pass a NULL with my current code:
    // Here I get the parameter
    // If we are dealing with an empty string or a NULL value, let's give it
                            // a value of a space so that Crystal's DLLs don't choke.
                            if ((value.Length == 0) || (value == "NULL"))
                                value = " ";
                            arrParams.Add(value);
    Object strParam = arrParams<i>;
    this.reportDocument1.SetParameterValue(num, strParam);
    The stored procedure parameter type is INT so in the report it shows up as NUMBER.
    How do I get a NULL value to the stored procedure?
    Thanks.

    See if this does the trick:
    Dim crParameterDiscreteValue As New CrystalDecisions.Shared.ParameterDiscreteValue()
    crParameterDiscreteValue.Value = Nothing
    C# would look something like;
    CrystalDecisions.Shared.ParameterDiscreteValue crParameterDiscreteValue;
    crParameterDiscreteValue = new CrystalDecisions.Shared.ParameterDiscreteValue();
    crParameterDiscreteValue.Value = null;
    Ludek
    Follow us on Twitter http://twitter.com/SAPCRNetSup

  • Xpath Debatching in Orchestration -The part 'part' of message 'Message_In_Copy' contained a null value at the end of the construct block

    Hi ,
    Facing strange issue in Xpath debatching in Orchestration.
    Getting following error in construct shape:
    The part 'part' of message 'Message_In_Copy' contained a null value at the end of the construct block
    Code inside the construct block:
    sXpath = System.String.Format("/*[local-name()='Customers' and namespace-uri()='http://Debatch.Customer']/*[local-name()='Customer' and namespace-uri()='http://Debatch.Customer' and position()={0}]", nLoopCount);
    System.Diagnostics.Debug.WriteLine(sXpath);
    Message_In_Copy= xpath(Message_In, sXpath);
    Schema used:
    <?xml version="1.0" encoding="utf-16"?>
    <xs:schema xmlns="http://Debatch.Customer" xmlns:b="http://schemas.microsoft.com/BizTalk/2003" targetNamespace="http://Debatch.Customer" xmlns:xs="http://www.w3.org/2001/XMLSchema">
    <xs:element name="Customers">
    <xs:complexType>
    <xs:sequence>
    <xs:element minOccurs="0" maxOccurs="unbounded" name="Customer">
    <xs:complexType>
    <xs:sequence>
    <xs:element name="name" type="xs:string" />
    <xs:element name="id" type="xs:string" />
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    </xs:schema>
    Can anyone help me out ? to identify the root cause for above issue.
    Thanks,
    Kind Regards,
    girsh
    girishkumar.a

    I agree with Shankycheil here, querying XPath will return XMLNode and thus can't be assigned to XMLNode.
    But for debatching in Orchestration using Xpath is not a very good idea. 
    Because using XPATH loads the complete message in memory(XML Structure) and then performs processing.
    This approach is always prone to throwing Out of Memory exception and low in performance also.
    Therefore I would suggest you to perform debatching by calling XML Disassembler(XMLReceive) pipeline.
    As pipeline works with Stream it will have better performance and you will also get complete control over the messages.
    Refer the below samples for debatching using XML Receive pipeline within Orchestration.
    Comparrison between XPATH and ReceivePipeline for Debatching:-
    De-batching within an orchestration using XPath or calling a pipeline
    Debatching within Orchestration using Pipeline-
    http://tech-findings.blogspot.in/2013/07/debatchingsplitting-xml-message-in.html 
    https://jeremyronk.wordpress.com/2011/10/03/how-to-debatch-into-an-orchestration-with-a-pipeline/
    Thanks,
    Prashant
    Please mark this post accordingly if it answers your query or is helpful.

  • How to put the null value at the last of  a select list

    Hello,
    I have a select list with a null value, I want the null value to be the last value in the list. It always appears in the top of the list, Desc and Asc order is not working.
    Thank you in advance!
    Edited by: Najla on Apr 1, 2013 10:37 PM

    Hi,
    Edited by: Howard (... in Training) on Apr 2, 2013 1:xx PM
    The statement - I don't think it is possible to arrange the order of the null option in a select list.- is close. You can't control the order of the Null value if you add the Null value through the GUI. However, it can be added and controlled as part of a SELECT ...
    One way is to add NULL to the "SELECT". Here the Yes/No are hard-coded but they could have been selected from a table:
    select d, r from
    select 'YES' d, 'Y' r from dual
      union all
    select 'No' d, 'N' r from dual
      union all
    select Null d, '<Null>' r from dual
    ) order by 1 desc NULLS lastHoward

  • Restricting Null Values in the report

    Hi All,
    I have a aggregated feild displayed in the bottom of the report and sorted on the report on that field to show me top results.
    When I try to run the report, Null values are coming first in the report (Displayed as NaN).
    I want to restrict these null values from the report.
    Please guide me on this.
    Thanks in advance,
    Imtiaz.

    Okay. If you are using sum, you could use the following: <?sum(Petrofac-ECRevenue[.!=''])?>
    ensure that the path to the element is correct. Are you using a syntax like <?sum(current-group()/Petrofac-ECRevenue)?>
    Send me an email to [email protected] with your xml data and RTF if you can't make it work.

  • How to Save the multiple selection check box values into the database

    i have the multiple selection check box implemented in UI through drop down list,i can choose the desired values from the drop down through checkbox, but i m unable to store these values and commit the values into the database all at a time.

    You can access the values using listbinding and can then store them as a string by using a delimiter.

  • JDT1.MTHDATE has null value although the transaction has already closed

    Dear All
    I need to know about when is a transaction closing date
    i think i can use JDT1.MTHDATE, but sometimes i found JDT1.MTHDATE have null value, although the transaction (AR or AP) have already been closed or paid
    any body know why it could be happened ?
    thanks
    Best Regards
    JeiMing

    Hi,
    Please check Note No.  : 1179946 if the same relates to the issue reported by you.
    Kind Regards,
    Jitin
    SAP Business One Forum Team

  • Setting null values vs Default or initial values in the Database?

    i am working on a system and i have set any field that might optional as Allow Null,, but this is causing me a lot of troubles especially when i am querying the data or perfoming some calculations from the database. So is it valid if i changed all the Allow null field to have initial values an restricting null values to be inserted into them, so example, to set the initial values for an integer to be 0 and string to be empty?

    Hi,
    You can implement business logic on db side or on app side.
    Advantage and disadvantage of implementation business logic on DB side.
    Advantages:
    1.Don't require app server software version changes/compilations (Java, C, C++, C#...)
    2.Stored procedures are stored directly in the db.
    3.DBA can manage and optimize the stored procedures in flexible way; it'll be transparent for app server because the same remaining interface.
    4.Avoidance of network traffic - the stored procedures can run directly within DB engine.
    5.Encapsulation of business logic as API in the database.
    6.Reports can be implemented like PL/SQL functions that return table data type. The functions can be called from application side - sort of API.
    Disadvantages:
    1.DB vendor specific, but when dealing with the same databases (for example Oracle) it's not relevant.
    2.Require DB skills to write the procedures correctly: it will require time for a pure java/c/c++/c# programmer to understand the DB code and to write it in optimal (from db point of view) way.
    3.If it's too complex business logic - the db side implementation can become too complex.
    To overcome issue with null(s) please use NVL function.
    Example:
    drop table  TEST_TABLE;
    create table TEST_TABLE(parameter varchar2(20), val number(10, 2));
    insert into TEST_TABLE values ('A', 23.245);
    insert into TEST_TABLE values ('B', null);
    insert into TEST_TABLE values ('C', 123);
    insert into TEST_TABLE values ('D', null);
    select avg(nvl(val, 0)) from TEST_TABLE;Hope this will help.
    Best Regards,
    http://dba-star.blogspot.com/

Maybe you are looking for

  • ITunes Installation Error 7 (Windows Error 126) for Windows 8

    I attempted to reinstall iTunes on my PC, and now iTunes won't run. I tried uninstalling and reinstalling the program again but get the same error messages: "The program can't start because MSVCR80.dll is missing from your computer" and "iTunes was n

  • Random numbers in applets

    I have an applet, and when I put this code at the beginning of the run method, it freezes up and wont do anything. (no exceptions, just sits there) Random rand = new Random(); int CurrStyle = rand.nextInt(3) + 1; int NextStyle = CurrStyle; why?

  • Essbase and Excel Add-in Migration from 6.5 to 11.1.2.1

    Hi, Essbase and excel 6.5 Wanted to Upgrade to 11.1.2.1 since there only essbase we just need to install 11.12.1 essbase and copy the otl files and series of steps but how to upgrade the Excel addin 6.5 to 11.1.2.1

  • BI content for E-sourcing in BI 7

    Hi, I have to activate e-sourcing standard reports in BI. Any idea where shall I get BI content for e-sourcing (under which application componnent) ?

  • Keep contract and switch the number to my payg number and give my old no to different network

    I have two pay as you go and one pay monthly I would like to use one of the pay as you go number for my pay monthly account and give my current may monthly number to my daughter who is on a different network to O2. Please explain if this can be done