Can anuone help me on persistence API problem please?

I would like someone to explain me why when using persistence API
sometime i can insert data in database normally but later when i
have added more functionalities like ajax, and file upload i can
insert data in database using persistence API.
for instance, using this i was able in the begin of my development
but now i am not:
utx.begin();
inst.insert(name, email); 
utx.commit();replace the code above by this below i can insert the data
at the same step of my project:
Class.forName("com.mysql.jdbc.jdbc2.optional.MysqlDataSource").newInstance();
            con = DriverManager.getConnection("jdbc:mysql://127.0.0.1/loja?user=marcos&password=131283");     
            String selectStatement = "insert into cadastroswebradio values(?, ?)";
            PreparedStatement prepStmt = con.prepareStatement(selectStatement);
            prepStmt.setString(1, name);
            prepStmt.setString(2, email);So what's the problem? could anyone help me?Thanks!!
this explain either:http://forum.java.sun.com/thread.jspa?threadID=764824

Basically i totally not understand your question and i believe also nobody would understand what is your question. You mean your persistence APIs, but you didnt show how the APIs and just use it, i can say that, the only different of that JDBC and your 'persistence', is your JDBC isnt commit function(not include auto-commit). What i can see is that's all.
But the idea of usage DB conn API should be correct with the 3 steps,
Begin - Open connection
Query - insert/update/delete
Close - commit
catch - Rollback
Hopefully it helps.

Similar Messages

  • Can anyone help me on persistence API problem?

    I would like someone to explain me why when using persistence API
    sometime i can insert data in database normally but later when i
    have added more functionalities like ajax, and file upload i can
    insert data in database using persistence API.
    for instance, using this i was able in the begin of my development
    but now i am not:
    utx.begin();
    inst.insert(name, email); 
    utx.commit();replace the code above by this below i can insert the data
    at the same step of my project:
    Class.forName("com.mysql.jdbc.jdbc2.optional.MysqlDataSource").newInstance();
                con = DriverManager.getConnection("jdbc:mysql://127.0.0.1/loja?user=marcos&password=131283");     
                String selectStatement = "insert into cadastroswebradio values(?, ?)";
                PreparedStatement prepStmt = con.prepareStatement(selectStatement);
                prepStmt.setString(1, name);
                prepStmt.setString(2, email);So what's the problem? could anyone help me?Thanks!!
    this explain either:http://forum.java.sun.com/thread.jspa?threadID=764824

    Basically i totally not understand your question and i believe also nobody would understand what is your question. You mean your persistence APIs, but you didnt show how the APIs and just use it, i can say that, the only different of that JDBC and your 'persistence', is your JDBC isnt commit function(not include auto-commit). What i can see is that's all.
    But the idea of usage DB conn API should be correct with the 3 steps,
    Begin - Open connection
    Query - insert/update/delete
    Close - commit
    catch - Rollback
    Hopefully it helps.

  • I have the iPhone 4 recently became weak Wi-Fi where I can not use the Internet only when sitting Bejjani router, Can anyone help me in solving this problem please iPhone 4, iOS 7.0.3

    I have the iPhone 4 recently became weak Wi-Fi where I can not use the Internet only when sitting Bejjani router, Can anyone help me in solving this problem please
    iPhone 4, iOS 7.0.3

    There's a whole lot to read in your post, and frankly I have not read it all.
    Having said that, this troubleshooting guide should help:
    http://support.apple.com/kb/TS1538
    In particular, pay attention to the mobile device support sections near the bottom, assuming you have already done the items above it.

  • HT201210 hi yesterday im was upgrading ios 7 in my iad butwhen its restart i turn it off and now its not working.it shows factory restore.i have done factory restore as well but after that its a same problem.can someone help me to fix that problem please

    hi all
    i have a ipad 2 and while im upgrading ios 7 in ipad i change my mind and i stop upgrading it,but after that when i turn it on it shows connect to itunes/i restore it but it still have a same problm,please i need your help to recover it thax

    Hi Jjjames,
    Thanks for posting. I'm really sorryo for the problems you've had. I can look into this for you if you wish. Drop me an email with your account details and a link to this post for reference and we'll take it from there. You'll find the address in my profile.
    Cheers
    David
    BTCare Community Mod
    If we have asked you to email us with your details, please make sure you are logged in to the forum, otherwise you will not be able to see our ‘Contact Us’ link within our profiles.
    We are sorry but we are unable to deal with service/account queries via the private message(PM) function so please don't PM your account info, we need to deal with this via our email account :-)

  • Can you help with my Flash installation problems please?

    My Adobe Flash Player (AFP) is gone and I cannot reinstall it.  I run Win 7 and IE10.  I was fine until 3 days ago.  The AFP support page tells me I do not have AFP, yet it is on my "uninstall programs" list.  I uninstall AFP, restart, install AFP (using save-run with no error messages), restart, and check the AFP support page to be told that I do not have AFP.  I have repeated this process several times to no avail.  I notice that Adobe Reader 11 and my Adobe Elements are located in C:\Program Files (x86)\Adobe\ but AFP is not there.  Please help!  Thank you.  (PS: Shockwave Flash Object is enabled for both 32-bit and 64-bit.)

    Flash Player is a browser plugin, not an executable program, and is therefore not installed under Program Files.
    If you have Shockwave Flash enabled, that means it is installed.  Perhaps you have ActiveX Filtering on?  See http://forums.adobe.com/thread/867968

  • Can  you help me to solve this problem (user-exit for xd02)

    Hi!
    can  you help me to solve this problem?
    transaction XD02
    To pass the length of the field to 7 max    for    KNA1-SORT   (Search criterion 1 )
    To pass the length of the field to 4  max   for   ADRC-SORT2  (Search criterion 2)
    It is not possible to save  the customer card as long as the search criterion is not univocal
    I seek one to use-exit .
    Thanks.

    Hi,
    Check the exit SAPMF02D.
    Regards,
    Surinder

  • Can someone help me with an iCloud problem when I take a picture with my iPhone 4s it some of the times go to my ipad2 but mostly it doesn't can anyone help me out

    Can someone help me with an iCloud problem when I take a picture with my iPhone 4s it some of the times go to my ipad2 but mostly it doesn't can anyone help me out

    I'm assuming you have Photo Stream set up of both devices.  However, it seems many users are experiencing the same as you - my take is that streaming photos is not foolproof yet.

  • Please can you help me to solve my problem  ( I have iphone is linked with Apple ID and I forgot that Apple ID and I can't remember it , I need thats Apple ID to activate my iphone ,,, what should I do ?

    please can you help me to solve my problem  ( I have iphone is linked with Apple ID and I forgot that Apple ID and I can't remember it , I need thats Apple ID to activate my iphone ,,, what should I do ?

    mohammed aljasim wrote:
    there are many people that error is happened with them and one of this people is me ,, Apple must be find the solution for this problem
    You are absolutely WRONG. Apple bears no responsibility in this at all. YOU purchased a STOLEN phone. You are guilty of receiving stolen property at best. Take it back to wherever you bought it and demand a refund. Failing that, turn it over to the police. You got ripped off. I'm sorry you wasted your money, but there is NOTHING Apple or anyone else can do for you. Only the rightful owner of the phone can unlock it.

  • HT5559 I  can't connecting  to chat  please can you help me,i think my problem with da java

    I  can't connecting  to chat  please can you help me,i think my problem with da java

    Have you read thread (From More like this on the right)
    https://discussions.apple.com/message/18837278#18837278

  • Hello.can anyone help me plz i have problem with my macbook air i can't find image capture.

    hello.can anyone help me plz i have problem with my macbook air i can't find image capture. there is nothing in progrem can i reinstall that progrem and how?thanks

    If you can't find it in your applications folder you will need to reinstall your Mac OS X. Take a look at this link, https://discussions.apple.com/message/16478873#16478873

  • Can anyone help me with an iWeb problem? I cannot save the site after making changes. I receive this error: "website.sites2 could not be saved"

    Can anyone help me with an iWeb problem? I cannot save the site after making changes. I receive this error: "website.sites2 could not be saved"

    You could try duplicating the Domain.sites2 file and launch this in iWeb. Delete the last page you edited and try saving. If that doesn't work, undo and try deleting another and so on...
    If you can find the problem page you would only have to rebuild it rather than the whole site.
    The other possibility is to create a new site on the same domain file and drag each page in turn down to it from the top site and try to save each time.

  • I have problem with my ipad3. I could not downgrade for ios 6.0.1 to 5.1.1. It was alarm code 3194. can u help me?, I have problem with my ipad3. I could not downgrade for ios 6.0.1 to 5.1.1. It was alarm code 3194. can u help me? Thanks...

    I have problem with my ipad3. I could not downgrade for ios 6.0.1 to 5.1.1. It was alarm code 3194. can u help me?, I have problem with my ipad3. I could not downgrade for ios 6.0.1 to 5.1.1. It was alarm code 3194. can u help me? Thanks...

    Apple does not support downgrading iOS levels.

  • HT1849 hello i downloaded an album on my iPad yesterday but the sound volume is very low. Can you help me to fix the problem ?

    hello i downloaded an album on my iPad yesterday but the sound volume is very low. Can someone help me to fix the problem ?

    Hello Kishore1022,
    It sounds like you have a new album downloaded and the tracks all have a very low volume. I recommend checking to see if Sound Check is enabled in the Music settings.
    iPad User Guide
    http://help.apple.com/ipad/7/#/iPad99f37037
    Go to Settings > Music to set options for Music, including:
    Sound Check (to normalize the volume level of your audio content)
    You can also try downloading the purchases onto a computer, with either of these articles depending on your version of the operating system:
    iTunes 11 for Windows: Download previous purchases from the iTunes Store
    http://support.apple.com/kb/PH12491
    Or
    iTunes 11 for Mac: Download previous purchases from the iTunes Store
    http://support.apple.com/kb/PH12283
    Thank you for using Apple Support Communities.
    Cheers,
    Sterling
    Thank you for using Apple Support Communities.
    All the best,
    Sterling

  • I have the following Imac and Iphoto 11 in Finder folder I upgrade the iphoto file  and  all the latest event files, can you help how to solve the problem? Thank you  Model Name iMac    Model Identifier:     iMa

    I have the following Imac and Iphoto 11 in Finder folder I upgrade the iphoto file  and I lost all the latest event files, can you help how to solve the problem? Thank you
    Model Name:     iMac
    Model Identifier:     iMac8,1   Processor Name:     Intel Core 2 Duo
    Processor Speed:     2.4 GHz

    http://support.apple.com/kb/HT2638?viewlocale=en_US&locale=en_US

  • HT1338 I have a macbook Pro i7 mid november 2010. I am wondering if i can exchange my notebook with the latest one. Can anyone help me out with this query please.

    I have a macbook Pro i7 mid november 2010. I am wondering if i can exchange my notebook with the latest one. Can anyone help me out with this query please.

    You can sell your existing computer using eBay, Craigslist or the venue of your choice. You could then use the proceeds to purchase a new computer.

Maybe you are looking for

  • Connect Macbook to Westinghouse Monitor - ?

    I am looking to buy a cable to connect my Macbook to an lcd monitor to get an extended display. I have a Macbook I bought in 2008 running on Mac OSX 10.5.8 and I want to connect it to a Westinghouse LCD Monitor model L1928NV. What cable/adaptor shoul

  • Purchasing requistion dates are not reflecting in R/3

    Hi All, material created in R/3,here purchase requistion generated in R/3 & APO. Then in APO,after Rescheduling in detailed scheduling planning board new purchase requistion delievery date is not reflecting in R/3. Kindly revert back ASAP. Regards, V

  • [SOLVED] Mailbox import requests stuck in 'queued' state

    We have a small Exchange 2013 environment with one server having all roles. I try to import archive mailboxes from an Exchange 2010 environment. It has worked quite well for a while. However, all import requests are now 'stuck' in 'queued' state. Res

  • MY IPOD LOCKED, HOW I CAN OPEN WITH ITUNES

    please any body tell me how i can open my Ipod again

  • Running javafx from java without jfx sdk installed

    I need to run jfx application on client's computer(without jfx sdk installation and outside the browser) from a java code. I also need to path parameters from java to javafx and to get return value. What i did: 1) put a.html, a_browser.jnlp and a.jar