What's the differences between connectors the old ones and newest ones?

i developed an application with tomcat jakarta 5.1-mysql-java servlets, and i had been using the mysql-connector-java-3.1.8-bin.jar connector a little old uh, my question is what is the differences between the last mencionated and this version mysql-connector-java-5.0.0-beta-bin.jar, you say "just the version", i mean, i know there are many changes in the new ones but i don't like the idea to change all my application, and i would like to know what changes i have to do for update and compiling with them. i.e. i always did it like this:
import java.sql.*;
public class MultiUsos {
private final static String log = "x";
private final static String pswd = "x";
private final static String Bd = "x";
private final static String URL = "jdbc:mysql://localhost:3306/"+Bd;
private Connection con = null;
private ResultSet rs = null;
private Statement stmt = null;
private Conexion conexion = null;
public int insert(String query) throws SQLException {
try {
con = conexion.getConexion(URL,log,pswd);
con.setAutoCommit(false);
if(con != null) {
stmt = con.createStatement();
r = stmt.executeUpdate(query);
stmt.close();
else System.out.print("� No existe conexion !");
catch(SQLException e) {
System.out.print("Error MySQL: ");
e.printStackTrace();
r = 0;
return r;
con.commit();
return r;
public void liberaConexion() {
try {
stmt.close();
con.commit();
con.close();
catch(Exception e) {
and i looked this example in new connectors:
PreparedStatement pstmt = connection.prepareStatement("insert into......
and things like that, i don't know if there were the same method in the older versions but if this is exclusive new for connectors, i'm fried.
i will apreciate all comments and help, and sorry about my not good english.
thanks.

and i looked this example in new connectors:
PreparedStatement pstmt =
connection.prepareStatement("insert into......
and things like that, i don't know if there were the
same method in the older versions but if this is
exclusive new for connectors, i'm fried.I am not sure if I understood your problem correctly but as I understand, you are worried because of the examples of PreparedStatement. That is an object representing a precompiled SQL statement. It is a part of the JDBC API, the same as Statement. There are several situations where the use of PreparedStatement is better than the usual Statement but this does not make the Statement obsolete.
I would suggest you to read the JDBC tutorial
http://java.sun.com/docs/books/tutorial/jdbc/
especially the section dealing with the use of PreparedStatement.
http://java.sun.com/docs/books/tutorial/jdbc/basics/prepared.html
In general, it is better if you go through the complete tutorial and understand the features which are provided in the JDBC API.
Hope I was helpful.

Similar Messages

  • What is the difference between corporate iTunes gift-cards and regular ones

    I have a small business and would like to make a competition and award iTunes gift-cards to the winners.
    I saw that there are corporate gift-cards but I don't know what their pros and cons are.
    And with regular gift-cards sent by e-mail: do the recipients receive my e-mail address or is it a no-reply e-mail?
    Thanks for the help.

    There are no functional differences that would affect the end user. I don't think there's any difference at all in the cards, actually, just the way you buy and the quantities you can purchase. See:
    http://www.apple.com/itunes/corporatesales/
    As to emailed codes sent through this program, I'm not sure if the recipient would see your email address. Call iTunes Corporate Sales and they should be able to tell you.
    Regards.

  • What's the difference between a not-initialed object and a null object

    hi guys, i wanna know the difference between a not-initialed object and a null object.
    for eg.
    Car c1;
    Car c2 = null;after the 2 lines , 2 Car obj-referance have been created, but no Car obj.
    1.so c2 is not refering to any object, so where do we put the null?in the heap?
    2.as no c2 is not refering to any object, what's the difference between c2 and c1?
    3.and where we store the difference-information?in the heap?

    For local variables you can't have "Car c1;" the compiler will complain.That's not true. It will only complain if you try to use it without initializing it.
    You can have (never used, so compiler doesn't care):
    public void doSomething()
       Car c1;
       System.out.println("Hello");
    }or you can have (definitely initialized, so doesn't have to be initialized where declared):
    public void doSomething(boolean goldClubMember)
       Car c1;
       if (goldClubMember)
           c1 = new Car("Lexus");
       else
           c1 = new Car("Kia");
       System.out.println("You can rent a " + c1.getMake());
    }

  • What is the difference between SAP NW PI7.1 and PI7.1 EHP1

    We have a customer using SAP PI7.1 EHP1. The application to be deployed
    isdeveloped on SAP Netweaver PI 7.1 SP06.
    We need to know if application developed and transported from PI7.1 is
    compatible with EHP1?
    Below are the Components used by the application .
    1) SSL communication using SOAP adapter
    2) Java mapping , Graphical mapping , XSLT mapping
    3) Customised EJB modules
    4) Adapter framework
    5) ALE layer for IDoc communication from ERP to PI
    6) RFC lookups to PI system and ERP system.
    Questions
    1)Will PI EHP1 be able to communicate with PI7.1 using SOAP adapter ?
    2) What is the difference between SAP NW PI7.1 and PI7.1 EHP1 ?
    Regards,
    Sneha

    Hi,
    EHP Pi7.1 new
    IPv6 Support in SAP Systems (new)
    Async/Sync and Sync/Async Bridge in the JMS Adapter (New)
    High Availability (New)   Locate the document in its SAP Library structure
    Use
    A new concept is available for setting up a high availability environment for SAP NetWeaver Process Integration (PI). To do this, you need SAP Web Dispatcher for load balancing, and you must reconfigure your HTTP, RFC, and RMI connections so that they can be used for load balancing. You must also make various configuration steps in other components of your PI environment.
    [Level 4: Document: XML to Text Conversion Module (New)] XML to Text Conversion Module (New)
    Message Packaging (New)
    Monitoring Milestones (New)   Locate the document in its SAP Library structure
    Use
    You can use the new scenario variant Monitoring Milestones of the Business Process Management scenario to define a monitoring process that can monitor events from different applications. A monitoring process can subscribe to events from SAP or non-SAP systems.
    check  given Link
    http://help.sap.com/saphelp_nwpi711/helpdata/en/61/8c3842bb58f83ae10000000a1550b0/frameset.htm
    Regards,
    Amit

  • What is the difference between component(Y, Pb, Pr) and component(R,G,B)?

    [I previously posted this question in another thread as hadn't realised how to post new question]
    Q. What is the difference between component (Y, Pb, Pr) and component (R,G,B) ?
    I’d previously thought I was reasonably savvy on all things HD, but when I turned my thoughts to looking into getting a mac mini to run part of my home cinema I realise I have some confusions around the above.
    Here’s what I think I know:-
    The mac mini has a DVI output of the type which can output both digital and analogue, and so via physical adapters it could be used to connect to displays that take HDMI or VGA style RGB leads.
    I know on the market I can get a DVI to Component cable lead which would therefore lead me to assume it could drive my HD plasma with component input (Y,Pb,Pr), as I currently drive the HD TV via component cable with a SKY HD box (720p and 1080i), an xbox 360 (720p) and a progressive scan DVD player (480p), all through a Denon AV-amp.
    The problem is, I’ve heard somewhere that the DVI to component is R,G,B only and that it is not Y, Pb, Pr which is making me wonder it a) this will work and b) if I really understand component video afterall.
    I notice the Apple TV outputs Y,Pb,Pr but colours them red, green and blue, so am even more confused….
    Hopefully someone can help educate me on this !

    Thanks for this.
    My Plasma is a Panasonic 42" Viera March 2005 model. No HDMI, No VGA.
    It can process signals up to 720p and 1080i via the component (an interestingly it makes a huge difference over SD even though the native panel is 480..!?!)
    Am I right in thinking that the iPod component cable will also be R,G,B and therefor might be a suitable trial? Ie. if the TV accepts the input from the iPod then it should work for the mini?
    Only other thing of note is I'm doing all this via my Denon 1707 AV amp which does have the facility of upscaling, but I imagine it needs to stick to one format?
    Thanks.

  • What is the difference between Safari 5.1.7 and 5.1.10? I can not log on to my website, so that their customer service has said that they are using Safari 5.1.7, and I use 5.1.10 (which I have installed on my computer, Mac)

    what is the difference between Safari 5.1.7 and 5.1.10?
    I can not log on to my website, so that their customer service has said that they are using Safari 5.1.7, and I use 5.1.10 (which I have installed on my computer, Mac)

    Might be the security fixes >  Safari 5.1.10 for Snow Leopard

  • What is the difference between j2sdk1.4.1_03/jre and j2re1.4.1_03?

    Hi,all!
    What is the difference between j2sdk1.4.1_03/jre and j2re1.4.1_03?
    Why there have two JRE? Which one we should use?

    JRE - Java Runtime Enviroment, what you stick on the end-user computers - http://www.java.com
    SDK - Software Development Kit (aka JDK - Java Developer Kit) - http://java.sun.com

  • What is the difference between 11.1.0.1 And  11.1.0.1.1

    What is the difference between 11.1.0.1 And 11.1.0.1.1

    11.1.0.1 is the base version of Oracle installed on the system.
    11.1.0.1.1 is the version of PSU (patch set update) applied to the base release version.
    Take a look at this http://docs.oracle.com/cd/B28359_01/server.111/b28310/dba004.htm

  • What is the difference between APPLE TV  models 30850MD199LLA and 300024854433?

    What is the difference between APPLE TV  models 30850MD199LLA and 300024854433?

    MD199 is as shown below. The other number is not an Apple model number.
    OVERVIEW
    Introduced     March 2012 (A1427) March 2013 (A1469)
    Discontinued     --
    Model Identifier     AppleTV3,1 (A1427) or AppleTV3,2 (A1469)
    Model Number     A1427 or A1469
    EMC     2528
    Order Number     MD199LL/A

  • What is the difference  between apple care protection plan and apple care

    What is the difference between apple care protection plan and apple care +

    apple care protection plan
    That is the extended warranty (total of 3 years including the standard warranty for the first year) for any Mac computer.
    apple care +
    That is the extended warranty (total of 2 years including the standard warranty for the first year) for any iDevice (iPad, iPhone, etc).
    For either, the standard warranty is usually referred to as hardware warranty (not Applecare); see an example for the warranty for an iMac:
    http://www.apple.com/legal/warranty/products/embedded-mac-warranty-us.html
    whereas the extended Applecare is referred to as that:
    http://www.apple.com/legal/sales-support/

  • What's the difference between tax account in FTXP and OB40

    Hi all,
    There are two tax accounts link to same tax code in FTXP for different company codes, but in OB40 I only can assign one account to tax code. What's the difference between tax account in FTXP and OB40?
    Thanks in advance.
    babyyw
    Edited by: babyyw on May 5, 2010 8:21 AM

    Hi,
    FTXP no need to create a request and it is easy but in OB40 system will ask you create request. and another thing is in FTXP it is at country level but in OB40 it is at chart of accounts level.

  • Whats the difference between adobe flashplayer plugin,activex and adobe flashplayer?

    whats the difference between adobe flashplayer plugin,activex and adobe flashplayer?

    How does Flash Player differ on various browsers?

  • Whats the difference between sending messages via socket and MQs?

    Whats the difference between sending messages via socket and MQs?

    Soph wrote:
    Whats the difference between sending messages via socket and MQs?With JMS (and the like) your application uses a socket to connect to a central server called a "*Message Broker*". Over this connection it can send or receive messages.
    A Message Broker is somewhat analogous to a database server. Multiple clients connect to it to exchange messages. As with a database a client first establishes a connection, then requests specific facilities like subscriptions.
    It creates a strong decoupling between sender and receiver and handles stuff like allowing multiple receivers for the same message, queuing of messages for applications not currently running and so on.
    (And don't worry, you can get perfectly good message brokers for free such as openMQ and activeMQ.)

  • What are the differences between Turn in Final Timesheet and the other option: Send Progress for Selected Tasks?

    Hello,
    The resource filled his/her timesheet in PWA. 
    Now : 
    What are the differences between Turn in Final Timesheet
    and the other option: Send Progress for Selected Tasks?
    Thanks

    You are partially correct and partially wrong.
    Turn
    in Final Timesheet sends
    the timesheet to the Timesheet Manager for Approval
    but task update always goes to Status manger of the task. Taks manager you can see in MPP(insert status manager field then check)
    Yes
    after approval progress will be available in MPP as well as in Projectweb app as % complete . 
    Send
    Progress for Selected Tasks 
    Send progress of selected task to status manager after approval update will be available in both MPP and Projectweb
    app as % complete.
    In Send
    Progress for Selected Tasks Timesheet
    Manager doesn't receive anything in his Approval center
    because all the update directly go to Status manager Approval center.
    Here you have to understand
    that there are two role Timesheet Manager(for timesheet approval) and Status manager(for task
    actual approval) 
    kirtesh

  • What's the difference between e.g. dialog listbox and regular listbox?

    What's the difference between e.g. dialog listbox and regular listbox?

    Dialog controls use platform specific drawing functions and cannnot be customized (change the color, etc). They often assume specific system colors.
    For example, place a dialog list box and a regular list box on your front panel. Now go to your Display control panel in windows and change the color scheme in the appearance tab. You will see that the dialog list box will change the color according to the selected scheme while the regular list box remains the same.
    Now use your labview color tool and try to change the color of each. You will be able to change the color of the regular list box, but not of the dialog list box.
    Functionally they are the same, the differences are cosmetic.
    LabVIEW Champion . Do more with less code and in less time .

Maybe you are looking for