Help!!  problem for insert a date in postgre from creator

i formatt the date, and this code:
SimpleDateFormat sdm=new SimpleDateFormat("dd-mm-yyyy)";
Date fecha= sdm.parse("12-05-2007");
compraDataProvider.setValue("fecha",rw,fecha);
display this error
Can't infer the SQL type to use for an instance of java.util.Date. Use setObject() with an explicit Types value to specify the type to use.

postgres (PostgreSQL) 8.0.13
postgresql-8.0-319.jdbc3.jar
i have the same problem with postgresql
i cant insert a row in a table with two columns codigo and name
public String salvar_action() {
CachedRowSetDataProvider cdp = getHombreDataProvider();
try {
RowKey rk = cdp.appendRow() ;
cdp.setCursorRow(rk) ;
cdp.setValue("hombre.codigo",rk,codigo.getText()) ;
error("paso aqui 1");
cdp.setValue("hombre.nombre",rk,nombre.getText()) ;
error("paso aqui 2");
cdp.commitChanges() ;
info("Row Inserted via Data Provider") ;
cdp.refresh(); // release rowset memory.
} catch (Exception ee) {
error( ee.getMessage() ) ;
return null;
did the same thing with firebird and no problem.. doing that..
anyone knows some solution?

Similar Messages

  • Problem in entry of data into database from tableUI

    Hi all,
    there is requriment in which i need to send the data in table ui into orcale database.  I am using EJB for inserting the data and also able to pick the values from the tableUI, but when i am tryin to enter into databse, it is showing error. what my doubt is will there be any prob in inserting data ino the database, since i am keeping the EJB method inside a for loop , thinging it will entry data as the loop iterates. can someone help me ill give full points for this query..
    Regards,
    SAi

    Hi,
    Use batch updates in the EJB.
    It would be help full if you could post the error or the issue what actully happnens
    Regards
    Ayyapparaj

  • I have a password problem. After importing data and settings from one MacBook Pro to a new one, I have to put my iCloud password in when re-starting, but the password from the old computer in when waking the computer from sleep.

    I have a password problem. After importing data and settings from one MacBook Pro to a new one, I have to put my iCloud password in when re-starting the new computer, but the password from the old computer in when waking the computer from sleep. I want to use my iCloud password on both computers consistently. How can I fix this?

    The only other place to change a password for the computer login is in Users & Groups preferences. But I don't really know enough here to fix your problem. You can try fixing the keychain:
    iCloud- Frequently asked questions about iCloud Keychain
    Tutorial: Resolving Keychain Issues
    If you can't access your keychain, or forget your password If you can't get into your keychain file because you've forgotten your password or the keychain file appears to be corrupt, there are a couple of options.
    First, if you've forgotten your password, you can use the "Keychain First Aid" utility to make the keychain password the same as the login password. This can be accomplished via the following process:
      1. Open Keychain Access (located in Applications/Utilities)
      2. Go to the "Keychain Access" menu and select "Preferences"
      3. Click the "First Aid" tab
      4. Make sure the "Synchronize login keychain password" box is checked
      5. Close the Preferences window
      6. Go to the "Keychain Access" menu and select "Keychain First Aid"
      7. Enter your username and password
      8. Click the "Repair" button
    The second option is to completely delete your keychain then recreate it. This routine is useful if your keychain appears to be corrupt or otherwise inaccessible. This can be accomplished as follows:
      1. Launch Keychain Access (located in Applications/Utilities)
      2. Click "Show Keychains" in the lower-left corner of the window.
      3. Select the problematic keychain from the left-hand pane.
      4. Navigate to the "File" menu and select "Delete Keychain '(name of keychain)'"
      5. Check all options for deletion and press "OK"
      6. Create a new keychain by going to the "File" menu, then "New" and selecting
          "New Keychain"
      7. You can now make this keychain your default if you desire by selecting it, then
          going to the "File" menu and selecting "Make '(name of keychain)' Default"
    Login as root and perform repair In some cases, problems with keychains can only be resolved when logged in as the root user.
    First, you want to enable the root user:
      1. OS X Mountain Lion: Enable and disable the root user
      2. OS X Lion: Enable and disable the root user
      3. Mac OS X 10.6: Enabling the root user
      4. Enabling and using the "root" user in Mac OS X
    After enabling the root user, and logging in under this account, again open Keychain Access. First attempt repairs using Keychain First Aid, and failing that, delete then recreate the keychain as described above while logged in as root.
    Persistently asked for stored passwords If you are persistently asked for passwords in various applications that you have specified should be remembered in a keychain, your "login" keychain may not be active for one reason or another.
    Navigate to ~/Library/Keychains/ (this is the Library folder inside your user's home folder). Find the file named "login.keychain" and double-click it.
    Failing that, select the "login" keychain within the Keychain Access application and make sure it is the default keychain by going to the "File" menu and selecting "Make 'Login' Default"
    Turn off Keychain synchronization in applications having problems If specific applications are experiencing issues when accessing password-protected material, the Keychain may be to blame.
    The above comes from an article published on MacFixit.com.

  • Any solution for preventing converted data (to excel) from crashing?

    Any solution for preventing converted data (to excel) from crashing - file crashes on a consistent basis.

    Hi Shrinivas,
    LabVIEW is getting bug fixes and new features with each version step.
    But new features also can bring new bugs - and not all bugs from older versions are fixed by now…
    The MixedSignalGraph is a beast of it's own and known to have bugs inside. The one you noticed now is probably one of those.
    So it's not your fault your VI terminates rather "unhappy", but most probably NI's fault. You can have a workaround as described in the last post.
    If I have to take same data from wire as you mentioned, I need to save the data in some variable
    No, you don't need any "variable"! THINK DATAFLOW: the wire is the variable!
    I have to write the data to excel file using report generation tool kit or some other way. … Please let me know if I can do it in some other easy methods. 
    It all depends on the datatype of your data. There are functions to save to spreadsheet files. You can save in binary files. You can create TDMS files , which can be read by Excel too. All those functions are really easy to use - you just have to look at the example VIs coming with LabVIEW!
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • I have been having problem for cad access since I upgrade from OSX 10.6 to OSX 10.8  Now it is akin me to select a certificate, but there is none listed

    I have been having problem for cac access since I upgrade from OSX 10.6 to OSX 10.8.   Now it is aking me to select a certificate, but there is none listed.

    Is the SW  you are using campaitible with 10.8.x?

  • Sql sript for Insert of data with repeating values

    It has been a long long time since I had to do write and use any SQL scripts, please forgive the question. I used to use a script to insert values into a table as part of my job. I have forgotten what the script I used was and since lost all my Oracle note books and other DBA material.
    I did a search and went through 30 pages of results, I didn't see what I'm looking for.
    The data is from one large file that is appended at the end and sometimes updated somewhere in the middle of the set which is considered new data. I am not concern with getting the data out of the file, I got that handled but the insert into the table - transactions - is where I'm lost.
    I used to use a script to load the data, about 6 years ago, and it would load the file, exclude the data that was already in the table and insert the new data and the data with the changes.
    The data columns are date, time, reference, transaction code, location, debit amount, fee amount, balance.
    The date repeats but the time and reference values are unique.
    Any help with this script is appreciated.

    Hi,
    welcome to the forum..!
    You can use Oracle's merge statement to (update + insert) data into a table ... if the data exists update it with the new values and if it does not, then insert it.
    Here's a link to get you started...
    http://download-uk.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_9016.htm
    Since, the data is from a file, you could create an external table on the file and directly do a select from the file.
    MERGE INTO bonuses D
       USING (SELECT employee_id, salary, department_id FROM employees
       WHERE department_id = 80) S
       ON (D.employee_id = S.employee_id)
       WHEN MATCHED THEN UPDATE SET D.bonus = D.bonus + S.salary*.01
         DELETE WHERE (S.salary > 8000)
       WHEN NOT MATCHED THEN INSERT (D.employee_id, D.bonus)
         VALUES (S.employee_id, S.salary*0.1)
         WHERE (S.salary <= 8000);in the above example, the
    SELECT employee_id, salary, department_id FROM employeesis the source data. instead of loading the file into a temporary table and then merge into the target table , you could read from <<<external_table_on_your_file>> and then do a merge into the target table.
    http://www.oracle.com/technology/products/oracle9i/daily/sept19.html
    If you encounter any problems, please post the full description of your error.
    Thanks,
    Rajesh.
    Please mark this/any other answer as helpful or answered if it is so. If not, provide additional details/feedback.
    Always try to provide create table and insert statements to help the forum members help you better.

  • Help needed regarding insertion of data into oracle

    Hi,
    I am student currently trying to do a project to up a semantic database using oracle. Have set up the semantic technologies for oracle 11gr2 and used the jena adapter to load an owl into oracle.
    But i am not sure how do i insert sample data that could reference the owl.
    Tried searching but unable to find any simple tutorial and have also looked through the developer's guide and also jenaadaptor guide.
    Is there any tutorials available that could help? thank you

    Hi,
    Please go to the OTN site for more information:
    http://www.oracle.com/technology/tech/semantic_technologies/index.html
    There you can find some training info (try the NCI Oracle By Example, it's a good tutorial):
    http://www.oracle.com/technology/tech/semantic_technologies/htdocs/semtech_training.html
    Regards,
    Vladimir

  • EJB3 problem in inserting the data to the database, editing

    the code below i have written to view the data but unable to insert the data and edit the data plz help me out how to write and wat is the logic
    package com.fms.fins.ref.ejb;
    import java.util.Collection;
    import java.util.List;
    import javax.ejb.Stateless;
    import javax.persistence.EntityManager;
    import javax.persistence.PersistenceContext;
    @Stateless
    public class SLawBean implements ILaw{
         @PersistenceContext(unitName="fins-entity") EntityManager em;
         public List searchLaw()
              List ss = em.createQuery("from Law eLaw").getResultList();
              return ss;
         public Collection addLaw(){
              Collection cc=em.createQuery("into Law cLaw")
              .setParameter(0, "cLaw.LAW_ID")
              .setParameter(0, "cLaw.LAW_DESCRIPTION")
              .getResultList();
              return cc;
    package com.fms.fins.par;
    import javax.persistence.Column;
    import javax.persistence.Entity;
    import javax.persistence.GeneratorType;
    import javax.persistence.Id;
    import javax.persistence.Table;
    @Entity
    @Table(name="LAW")
    public class Law {
         private String lawId;
         private String lawDescription;
         public Law(){}
         @Id(generate=GeneratorType.AUTO)
         @Column(name="law_id")
         public String getLawId(){
              return lawId;
         public void setLawId(String lawId){
              this.lawId = lawId;
         @Column(name="law_description")
         public String getLawDescription(){
              return lawDescription;
         public void setLawDescription(String lawDescription){
              this.lawDescription = lawDescription;
    package com.fms.fins.ref.web;
    //import java.util.Iterator;
    import java.util.Collection;
    import java.util.List;
    //import javax.faces.component.html.HtmlCommandButton;
    import com.fms.base.util.EjbLoader;
    import com.fms.fins.par.Law;
    import com.fms.fins.ref.ejb.ILaw;
    public class LawBean extends Law{
         //private HtmlCommandButton commandButton1;
         //private HtmlCommandButton commandButton2;
         //private HtmlCommandButton commandButton3;
         private List elawList;
         public List getElawList() {
              return elawList;
         public void setElawList(List elawList) {
              this.elawList = elawList;
         public String actionViewlaw() throws Exception {
              try{
                   EjbLoader ejbLoader = new EjbLoader();
                   ILaw ejbILaw = (ILaw)ejbLoader.getEjb(ILaw.class.getName());
                   1. getElawList(ejbILaw.searchLaw());
                   2. elawList = ejbILaw.searchLaw();
                   elawList = ejbILaw.searchLaw();
              }catch(Exception ex){
                   ex.printStackTrace();
                   //throw ex;
              return "viewlaw";
         private Collection clawList;
         public Collection getClawList() {
              return clawList;
         public void setClawList(Collection clawList) {
              this.clawList = clawList;
         public String actionAddLaw()throws Exception{
              try{
                   EjbLoader ejbLoader = new EjbLoader();
                   ILaw ejbILaw = (ILaw)ejbLoader.getEjb(ILaw.class.getName());
                   clawList=ejbILaw.addLaw();
              }catch(Exception e){
                   e.printStackTrace();
              return "addlaw";
          }

    Hi Vengal !
    What is your module configuration in comm channel ??
    what is your current result and the expected one.
    Regards,
    Matias.

  • Insert query for insert all data into table in vb6 but it insert 1 row in table

    This is My insert query in vb6 but it insert 1 row in table
    But i want insert all data in the table which contain the id =1.
    Note that billtabsuport is blank
    i want solution for this
    strSQL = " select * from billtabsuport1 where StockID=" & lblid.Caption
    Set DBrecordset = DBConnection.Execute(strSQL)
    strSQL = " Insert into billtabsuport values('" & DBrecordset("StockID") & "','" & DBrecordset("C_Name") & "','" & DBrecordset("C_Add") & "','" & DBrecordset("C_Mobile") & "','" & DBrecordset("Invoice_No") & "','" & DBrecordset("Date") & "','" & DBrecordset("Order_No") & "','" & DBrecordset("T_Name") & "','" & DBrecordset("Dest") & "','" & DBrecordset("D_Date") & "','" & DBrecordset("Tyres_Serial_No") & "','" & DBrecordset("P_Desc") & "','" & DBrecordset("PR") & "','" & DBrecordset("Branded_NonBranded") & "','" & DBrecordset("Claim_No") & "','" & DBrecordset("Qty") & "','" & DBrecordset("U_Price") & "','" & DBrecordset("I_Value") & "','" & DBrecordset("V_Rate") & "','" & DBrecordset("V_Amt") & "','" & DBrecordset("Size") & "','" & DBrecordset("Pattern") & "','" & DBrecordset("TypesOfStock") & "','" & DBrecordset("TypesOfTube_Flap") & "','" & DBrecordset("VatAmount") & "')"
    DBConnection.Execute (strSQL)

    The syntax for inserting from one set of tables to a new table is:
    insert into newtable
    (field1, field2, etc)
    select somefield1, somefield2, etc
    from some other tables
    where whatever

  • Help need on inserting system date on database

    hello every body,
    I need to insert system date into database through prepared statement.
    i wrote code :
    java.util.Date d=new java.util.Date();
    Preparestatement psmt;
    psmt.setDate(8, java.sql.Date(d));
    am getting class cast exception :
    could u please tell me how to insert system date through prepared statement..
    thanks in advance..

    Surround your code with a
    try{
    //Insert date here
    catch(Exception e){
    //handle exceptions here
    e.printStackTrace();
    Who says he didn't already?
    Try this:
    java.util.Date d=new java.util.Date();
    >
    Preparestatement psmt;
    psmt.setDate(8, new
    java.sql.Date(d.getTime()));This is correct, but can be condensed (if you want)
    psmt.setDate(8, new java.sql.Date(new java.util.Date().getTime()));
    >
    It's good idea to use the JDBC escape function
    instead of using a specific DBMS function. This way,
    your code will be portable.
    sql = "INSERT INTO USERS VALUES("
    + "'" + userName + "'" + ","
    + "'" + userPw   + "'" + ","
    + "  {fn now() }  )"; e Real's How To
    (http://64.18.163.122/rgagnon/javadetails/java-0567.ht
    ml)
    And this is only marginally applicable.  If he wishes to use the same statement for the current date, as well as other dates, he cannot make use of this.  Of course, I don't really know if I would trust or recommend a tutorial site that advocates building statements that are screaming for injection attack attempts.
    Edit:  Too slow by a mile!                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Help needed badly Insert text data from xml files into tables

    Hi all, I have asked to do insertion of text from a xml file into tables upon receiving using pro*c. i've done quite an amount of research on xml parser in c but there wasn't much information for mi to use for implementation...
    Guys don't mind helping me to clarify few doubts of mine...
    1. Where can i get the oracle xml parser libs? Is it included when i installed oracle 8i?
    2. Is there any tutorials or help files for xml parser libs where i can read up?
    I need the xml parser to recognise the tags, followed by recognising the text after the tags.
    eg. xml format
    <studentID> 0012 </studentID>
    <student> john </student>
    <studentID> 0013 </studentID>
    <student> mary </student>
    text willl be inserted into tables like this:
    studentID | student
    0012 | john
    0013 | mary
    by the way i'm using oracle 8i on HP-UX. Thanks in advance.

    I can answer one of of your questions at least
    1. Where can i get the oracle xml parser libs? Is it included when i installed oracle 8i?You need the XML XDK. You can use http://www.oracle.com/technology/tech/xml/xdkhome.html as your starting point. I believe the 9i version works for 8i.
    I have no pro*c experience so I can't offer any other suggestions regarding how to do this in pro*c.

  • BADI USER/EXIT for inserting cust. data after the Pruch. Requsitio is SAVED

    Hi all,
    Is there any  BADI or USER EXIT available for the transaction ME51N to save
    some customer data fields in a separta Z table , after the data is saved from the
    Purcahse requistion .
    I  have used the customer exit MEREQ001 for additing the customer filelds with TABLE CONTROL.
    I am not able to save the data from the table control . Any suggestion on this will be apprecitated  .
    Best Regards

    Hi,
      You have  to use 'EXIT_SAPLMEREQ_003' to import data from screen to your tables and use 'EXIT_SAPLMEREQ_001' to send data to screen.use the below code like below:
    EXIT_SAPLMEREQ_001:
    tables : ci_ebandb.
    data : i_mereq_item type mereq_item.
    if im_req_item is initial.
    clear: ci_ebandb.
    else.
    i_mereq_item = im_req_item->get_data( ).
    move-corresponding i_mereq_item to ci_ebandb.
    endif.
    EXIT_SAPLMEREQ_003
    data : i_mereq_item type mereq_item.
    if not im_req_item is initial.
    i_mereq_item = im_req_item->get_data( ).
    move-corresponding ci_ebandb to i_mereq_item .
    call method im_req_item->set_data( i_mereq_item ).
    endif.
    Also set the flag EX_CHANGED = 'X' to transafer the changes to database
    Regards,
    Himanshu

  • Facing problem for inserting the  RFC return response in JDBC

    Hi
    Can any one  share views for resulting my problem,
    This is my scenrio(JDBC>RFC>JDBC) logic follows like this:
    Design:
    1. MT--X(request from JDBC(A))
    2. MT--Y(Response to JDBC(A))
    3. Defined Outbound Sync MI(Z) and given request as 'X' and response as 'Y'
    4. Imported BAPI--B
    5. Done MM between X and B-->request mapping(Zmap1)
    6. Done MM between B.Response and Y--->response mapping(Zmap2)
    7. Defined the IM between Z and B
        a. Zmap1 given as request
        3. Zmap2 given as response
    And according to that i have confgured CCs,SA,RA,RD,ID. 
    It seems to be working fine..request map posting data properly in BAPI and also getting response as payload only, but it is not updating in JDBC column, which i mapped as response!it seems to be everry thing is ok..but i dint understand why it is not updating the return response in JDBC side?
    Note: Here i'm not using BPM, without BPM i made synchronous.
    In SxMB_MONI ..i'm getting response as E or S based on rfc return structure.
    Regards
    Rambarki

    Hi,
    I think there is a mistake in your messaage type to insert into JDBC. The format should be,
    <MT>
      <statement>
         <test action="insert">
              <table> </table>
         </test>
         <access>
              <row1>  </row1>
              <row2>  </row2>
         </access>
      </statement>
    </MT>
    Your action is an attribute of <test>.
    Likewise in your case, you Message should be something like,
    <root>
         <statement>
              <Invoice action="insert">
              <table> nameoftable <table>
              <access>
                   <f1> </f1>
                   <f2>     </f2>
              </access>
         </statement>
    </root>
    Check out these links on the various options avaiable for the JDBC adapetr and how the action attribute can be used,
    http://help.sap.com/saphelp_nw04/helpdata/en/2e/96fd3f2d14e869e10000000a155106/content.htm
    Also, check this simple file to jdbc blog for your reference on JDBS adapter,
    /people/sap.user72/blog/2005/06/01/file-to-jdbc-adapter-using-sap-xi-30
    Hope this clarifies and solves a part of your problem,
    Regards,
    Bhavesh

  • Problem with inserting XML data server in ODI

    Hi,
    I was trying to insert an XML data server in ODI. I want to use it for my target database.i.e i want my target to be an xml file. So while specifying the url in the data server, what should i mention as the file name,dtd file , root etc? what i have done is dat i hav created the dtd file as per my requirement.i have created an empty xml file. while testing the connection an error comes : java.sql.SQLException: A parsing exception occurred saying Whitespace required..
    Next i tried putting jz d root tags in the xml file without any content. this returned the same error. next i tried inserting all d tags as per my dtd file. same error came...
    Please help.
    Regards,
    Divya
    Message was edited by:
    Divya Padmanabhan

    For empty xml try to use:
    <?xml version="1.0" encoding="UTF-8"?>
    <ROOT_SOME></ROOT_SOME>
    as jdbc connect string:
    jdbc:snps:xml?f=../demo/xml/1/file.xml&ro=false&ldoc=true&case_sens=true&s=LEO_FIZ&dod=true
    and try again...

  • MERGE Statement Problem for Storing Old Data

    Hi,
    I am using MERGE statement to update as well as insert rows on ta table.
    I have a data like in a table 'TABLEA' as 10 20 30 ABCD
    I want to update the table using 10 20 30 DEFG but i want the old data i.e 10 20 30 ABCD
    to store in a History table i.e TABLEA_H.
    Is there any way to store the data
    Any help will be needful for me

    Hi,
    Trigger usage may affect the performance as we are handling Production environment.
    is there any way to implement the scenario without using Triggers?
    Any help will be needful for me

Maybe you are looking for

  • What is the best way to manage graphic assets in Adobe?

    If anyone has some insight to how they go about managing icons and other image assets that are commonly used across multiple documents, please let me know. My thoughts thus far: 1. I would love to use symbols and symbol libraries, but this only appea

  • Multiple copies of the same alert on SCOM console

    We have an Oracle EM Grid Control 11.1.0.1 installation and the SCOM connector is configured to send alerts to a SCOM 2007 R2 system. We note that every alert from OEM appears on the SCOM console 5 times (a minute late with each other), we suspect th

  • Diplay images one at a time (Was: Help Please)

    Hi i'm trying to set images to arrow through but can not get the images to just show one at a time.. this is what i have but when i add the images onto the code it just shows them all up on one page. someone please give me right code <!--Arrow Naviga

  • "A.swf" on level 0 to a "B.swf" on level 1 with an "gotoAndStop(5)????

    Has enybody an idea, how i can refer from a flash "A.swf" on level 0 to a "B.swf" on level 1 with an "gotoAndStop(5). I tried it with: loadMovieNum("B.swf", 9), gotoAndStop(5); and other variations. It didn´t work anytime. Has anybody an idea how it

  • Using &APP_ID. in uploaded javascript file

    Hi dev's, I fumbling around with a quite annoying problem. When I create a javascript directly inside the "Header Text" of my page the script works perfectly: <script type="text/javascript"> function fnc_setTreeItem (pItem)   var get = new htmldb_Get