Problem with inserting data into mySQL database with jsp

I have a jsp page that collects infromation about a users vehicle and puts the data into a mySQL database. Iv'e been messing around with it for ages & i can't seem to get it to work even though i cannot see anything wrong with the code, which can be seen below.
<%@ page contentType="text/html; charset=iso-8859-1" language="java" import="java.sql.*" errorPage="" %>
<%@ include file="Connections/connection.jsp" %>
<%
// *** Restrict Access To Page: Grant or deny access to this page
String MM_authorizedUsers="";
String MM_authFailedURL="login_form.jsp";
boolean MM_grantAccess=false;
if (session.getValue("MM_Username") != null && !session.getValue("MM_Username").equals("")) {
  if (true || (session.getValue("MM_UserAuthorization")=="") ||
          (MM_authorizedUsers.indexOf((String)session.getValue("MM_UserAuthorization")) >=0)) {
    MM_grantAccess = true;
if (!MM_grantAccess) {
  String MM_qsChar = "?";
  if (MM_authFailedURL.indexOf("?") >= 0) MM_qsChar = "&";
  String MM_referrer = request.getRequestURI();
  if (request.getQueryString() != null) MM_referrer = MM_referrer + "?" + request.getQueryString();
  MM_authFailedURL = MM_authFailedURL + MM_qsChar + "accessdenied=" + java.net.URLEncoder.encode(MM_referrer);
  response.sendRedirect(response.encodeRedirectURL(MM_authFailedURL));
  return;
String vehicle_details__registration = null;
if(request.getParameter("txt_registration") != null){ vehicle_details__registration = (String)request.getParameter("txt_registration");}
String vehicle_details__make = null;
if(request.getParameter("txt_make") != null){ vehicle_details__make = (String)request.getParameter("txt_make");}
String vehicle_details__model = null;
if(request.getParameter("txt_model") != null){ vehicle_details__model = (String)request.getParameter("txt_model");}
String vehicle_details__colour = null;
if(request.getParameter("txt_colour") != null){ vehicle_details__colour = (String)request.getParameter("txt_colour");}
String vehicle_details__tax_class = null;
if(request.getParameter("select_tax_class") != null){ vehicle_details__tax_class = (String)request.getParameter("select_tax_class");}
String vehicle_details__chasis_num = null;
if(request.getParameter("chasis_num") != null){ vehicle_details__chasis_num = (String)request.getParameter("chasis_num");}
String vehicle_details__status = null;
if(request.getParameter("radio_status") != null){ vehicle_details__status = (String)request.getParameter("radio_status");}
String owner_details__MMColParam = "1";
if (session.getValue("MM_Username") !=null) {owner_details__MMColParam = (String)session.getValue("MM_Username");}
Driver Drivervehicle_details = (Driver)Class.forName(MM_connection_DRIVER).newInstance();
Connection Connvehicle_details = DriverManager.getConnection(MM_connection_STRING,MM_connection_USERNAME,MM_connection_PASSWORD);
PreparedStatement vehicle_details = Connvehicle_details.prepareStatement("INSERT INTO vehicle_man_db.vehicle_details (registartion, make, model, colour, tax_class, chasis_num) VALUES ('"+ String vehicle_details__registration + "', '"+ String vehicle_details__make + "', '"+ String vehicle_details__model + "', '"+ String vehicle_details__colour + "', '"+ String vehicle_details__tax_class + "', '"+ String vehicle_details__chasis_num + "', '"+ String vehicle_details__status + "')");
vehicle_details.executeUpdate();
%>
<form name="add_vehicle_form" id="add_vehicle_form">
  <p>Registration mark:
    <input name="txt_registration" type="text" id="txt_registration">
</p>
  <p>Make:
    <input name="txt_make" type="text" id="txt_make">
</p>
  <p>Model:
    <input name="txt_model" type="text" id="txt_model">
</p>
  <p>Colour:
    <input name="txt_colour" type="text" id="txt_colour">
  </p>
  <p>Tax Class:
    <select name="select_tax_class" id="select_tax_class">
      <option value="AAA">Band AAA (up to 100g/km)</option>
      <option value="AA">Band AA (101 - 120g/km)</option>
      <option value="A">Band A (121 - 150g/km)</option>
      <option value="B">Band B (151 - 165g/km)</option>
      <option value="C">Band C (166 - 185g/km)</option>
      <option value="D">Band D (Over 185g/km)</option>
    </select>
  </p>
  <p>Chasis Number:
    <input name="txt_chassis_num" type="text" id="txt_chassis_num">
</p>
  <p>Status: active:
    <input name="radio_status" type="radio" value="1" checked>
    off-road
    <input name="radio_status" type="radio" value="0">
  </p>
  <p>
    <input type="submit" name="Submit" value="Submit">
</p>
</form>
<%
Connvehicle_details.close();
%>This is the error I am getting from the server
org.apache.jasper.JasperException: Unable to compile class for JSP
An error occurred at line: 3 in the jsp file: /add_vehicle_form.jsp
Generated servlet error:
C:\Servers\Tomcat 5.0\work\Catalina\localhost\Assignment\org\apache\jsp\add_005fvehicle_005fform_jsp.java:113: ')' expected
PreparedStatement vehicle_details = Connvehicle_details.prepareStatement("INSERT INTO vehicle_man_db.vehicle_details (registartion, make, model, colour, tax_class, chasis_num) VALUES ('"+ String vehicle_details__registration + "', '"+ String vehicle_details__make + "', '"+ String vehicle_details__model + "', '"+ String vehicle_details__colour + "', '"+ String vehicle_details__tax_class + "', '"+ String vehicle_details__chasis_num + "', '"+ String vehicle_details__status + "')");
^
1 error
     org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:84)
     org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:332)
     org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:412)
     org.apache.jasper.compiler.Compiler.compile(Compiler.java:472)
     org.apache.jasper.compiler.Compiler.compile(Compiler.java:451)
     org.apache.jasper.compiler.Compiler.compile(Compiler.java:439)
     org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:511)
     org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:295)
     org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
     org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
     javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
Any help would be much appreciated.
Thanks

use this ...
PreparedStatement vehicle_details =
Connvehicle_details.prepareStatement("INSERT INTO
vehicle_man_db.vehicle_details (registartion, make,
model, colour, tax_class, chasis_num) VALUES
vehicle_details .setString(1,String
vehicle_details__registration );
vehicle_details setString(2,String
vehicle_details__make );
vehicle_details .setString(3,String
vehicle_details__model );
vehicle_details .setString(4,vehicle_details__colour
vehicle_details .setString(5,String
vehicle_details__tax_class);
vehicle_details .setString(6,String
vehicle_details__chasis_num );
vehicle_details .executeQuery();Even you need a screwing up... what's the point putting that String inside. That's the bloody error.

Similar Messages

  • Problem in inserting data into MySQL table

    Hi All,
    I have a table with just two fields FIRSTNAME and SECONDNAME in MySQL. I am accepting the First Name and Second Name in two text fields and then trying to insert them into the MySQL table. I have set the concurrency of the rowset to CONCUR_UPDATABLE and am using the code clip for Database row insert with the appropriate changes. When I run the application it doesnt give me any errors but the data is also not inserted in the table. Can someone pls help me out.
    Loneliness wins the race :-)

    This is my problem when inserting single row. What does it means ?
    MusicInsert: com.mysql.jdbc.NotUpdatable: Result Set not updatable.This result set must come from a statement that was created with a result set type of ResultSet.CONCUR_UPDATABLE, the query must select only one table, and must select all primary keys from that table. See the JDBC 2.1 API Specification, section 5.6 for more details

  • How to insert data into mysql database using GUI?

    HI there,
    I have created a GUI application using Netbeans 6.7.1 in which there are three jtextfields. Now from those text fields i have to insert data in the mysql database. I have already connected to mysql using drivers and URL which is used to connect to DB. So what code should i write in the source of these text fields. Please help me and give the code to it.
    I actually don't know what code to be written in the source of a text field.
    Thank You.

    Yo buddy i didn't mean that. I wanted to say that if you see my project then it will be easy for you to help me. okay have a look at this code and tell me i have just created my gui
    This is Main.java -->
    package bookdatabase2;
    import java.sql.*;
    import java.awt.*;
    import javax.swing.*;
    * @author Mohd Azeem
    public class Main {
    * @param args the command line arguments
    public static void main(String[] args)throws Exception {
    // TODO code application logic here
    Class.forName("com.mysql.jdbc.Driver");
    Connection con=DriverManager.getConnection("jdbc:mysql://localhost:3306/books","root","");
    //PreparedStatement state=con.prepareStatement("select * from titles");
    //ResultSet result=state.executeQuery();
    //while(result.next()){
    // System.out.println(result.getString(1)+" "+result.getString(2)+" "+result.getString(3)+" "+result.getString(4));
    This the gui i have created
    BookDatabase.java -->
    package my.bookdatabase;
    import java.sql.*;
    import javax.swing.*;
    public class BookDatabase extends javax.swing.JFrame {
    public BookDatabase()throws Exception {
    Class.forName("com.mysql.jdbc.Driver");
    Connection con=DriverManager.getConnection("jdbc:mysql://localhost:3306/books","root","");
    initComponents(); }
    private void jTextField1ActionPerformed(java.awt.event.ActionEvent evt) {                                           
    // TODO add your handling code here:
    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {                                        
    // TODO add your handling code here:
    public static void main(String args[])throws Exception {
    java.awt.EventQueue.invokeLater(new Runnable() {
    public void run() {
    try{
    new BookDatabase().setVisible(true);}
    catch(Exception e){}
    // Variables declaration - do not modify
    private javax.swing.JButton jButton1;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JTextField jTextField1;
    private javax.swing.JTextField jTextField2;
    private javax.swing.JTextField jTextField3;
    private javax.swing.JTextField jTextField4;
    private javax.swing.JTextField jTextField5;
    private javax.swing.JTextField jTextField6;
    private javax.swing.JTextField jTextField7;
    // End of variables declaration
    Now tell me what to do?
    i have only created the gui but unable to run it
    when i click on run only main.java is being executed
    but bookdatabase.java is not getting executed?
    what should i do please help?

  • Help with inserting Date into MySQL DB from registration form input

    I'm trying to automatically input the registration date of a customer into my MySQL DB. Nothing seems to work. I've tried timestamp in a table field, I've tried a hidden field in the form. Any suggestions?

    You can use NOW() in the insertion record code, it will display like a time stamp format (date + time). Otherwise u can use this if u just want to store the date, $today = date("j F Y "); . It will display like 21 May 2009. Further information about date() function you can get it HERE.

  • Inserting data in remote database with remote procedure

    Hi,
    I have a problem concerning inserting data in a remote database (10g) by using a remote procedure.
    I call the procedure from a 11g database just by doing:
    begin
    getlocalfilecontent@remoteserv(param)
    commit;
    end;
    And it wouldn't insert the data into the remote table.
    While when I execute the same procedure locally on that remote database (10g)
    It does insert the data I want.
    What could be causing the problem here, am I overseeing something?
    Edited by: user7634309 on 14-Aug-2009 02:14

    Already thanks for the fast replies
    The dblink works perfectly. I can select data etc with this dblink.
    The procedure on the remote database is the same.
    One other thing, when I execute the remote procedure on local database 2nd time I get the
    ORA-ERR: ORA-02041: client database did not begin a transaction.
    This could be fixed by doing a commit or rollback but still no inserting in remote table.
    So to sum it up:
    What doesn't work:(no inserting)
    On 11g server that calls remotely the procedure
    begin
    getlocalfilecontent@remoteserv(parameter);
    commit;
    end;
    What works(does insert)
    On 10g server calling the procedure locally
    begin
    getlocalfilecontent(param);
    commit;
    end;
    So everything is the same except on the 11g server I add the dblink spec behiind the procedurecall

  • Insert data into oracle database using a PHP form

    I'm trying to enter data into my oracle database table using a php form. When I click submit no data is added. Could someone help me please. I'm new to php/oracle thing.
    NOTE: I don't have any problem connecting to the database using php.
    Here is the code I'm using:
    <?php
    // just print form asking for name if none was entered
    if( !isset($query)) {   
    echo "<form action=\"$uri\" method=post>\n";
    echo "<p>Enter Name: ";
    echo "<input type=text size=100 maxlength=200 name=data value=\"$data\">\n";
    echo "<br><input type=submit name=submit value=Submit>\n";
    echo "</form>\n";
    exit;
    // insert client's name
    $query = "INSERT INTO client (name) VALUES ($data)";
    // connect to Oracle
    $username = "xxxx";
    $paswd = "yyyyyy";
    $dbstring = "(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)".
    "(HOST=patriot.gmu.edu)(PORT=1521))".
    "(CONNECT_DATA=(SID=COSC)))";
    $db_conn = ocilogon($username, $paswd, $dbstring);
    $stmt = OCIParse($db_conn, $query);
    OCIExecute($stmt, OCI_DEFAULT);
    OCIFreeStatement($stmt);
    OCILogoff($db_conn);
    ?>
    Thanks for your help. I will also appreciate a better was to do it.
    Tony

    resumption and jer,
    Sorry I cannot format the code for easy reading!
    The page is submitting to itself. See action = \"$uri\". I used the same logic to enter SELECT querries into the database. It pulls and displays data back on the webpage. The code I used for this is below. Compare it with the one above for inserting data into the table.
    <?php
    // connect to oracle
    $username = "xxxxx";
         $paswd = "yyyyy";
         $dbstring = "(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)".
              "(HOST=patriot.gmu.edu)(PORT=1521))".
              "(CONNECT_DATA=(SID=COSC)))";
         $db_conn = ocilogon($username, $paswd, $dbstring);
    // username and password will be unset if they weren't passed,
    // or if they were wrong
    if( !isset($query)) {
    // just print form asking for account details
    echo "<form action=\"$uri\" method=post>\n";
    echo "<p>Enter Query: ";
    echo "<input type=text size=100 maxlength=200 name=query value=\"$query\">\n";
    echo "<br><input type=submit name=submit value=Submit>\n";
    echo "</form>\n";
    exit;
    // remove unwanted slashes from the query
    $query = stripslashes($query);
    // run the query
    $stmt = OCIParse($db_conn, $query);
    OCIExecute($stmt, OCI_DEFAULT);
    // Open the HTML table.
    print '<table border="1" cellspacing="0" cellpadding="3">';
    // Read fetched headers.
    print '<tr>';
    for ($i = 1;$i <= ocinumcols($stmt);$i++)
    print '<td class="e">'.ocicolumnname($stmt,$i).'</td>';
    print '</tr>';
    // Read fetched data.
    while (ocifetch($stmt))
    // Print open and close HTML row tags and columns data.
    print '<tr>';
    for ($i = 1;$i <= ocinumcols($stmt);$i++)
    print '<td class="v">'.ociresult($stmt,$i).'</td>';
    print '</tr>';
    // Close the HTML table.
    print '</table>';
    OCIFreeStatement($stmt);
    OCILogoff($db_conn);
    ?>

  • Native SQL: insert data into oracle database, no return message.

    hi,
    the statement : insert into <TableName> values (Source)
    how can I know if the data have already insert to the database table?
    now I have a program have this problem: the data has already exist, but there's no error message return when insert the same data again.
    data: dbs like dbcon-con_name value 'HRGK',
                       dbtype type dbcon_dbms.
    data: sqlerr_ref type ref to cx_sql_exception,
             exc_ref    type ref to cx_sy_native_sql_error,
             error_text type string.
    data: cnt type i,
            i(2) type c.
    set locale language 'E'.
    EXEC SQL.
      CONNECT TO :DBS
    ENDEXEC.
    EXEC SQL.
      SET CONNECTION :DBS
    ENDEXEC.
    EXEC SQL.
      SELECT COUNT(*) from org_unit into :cnt
    ENDEXEC.
    write: / cnt.
    *do.
    i = 'A'.               
    try.
        EXEC SQL.
          BEGIN
           insert into ORG_UNIT ( ORGAN_ID, UNIT_NO, UNIT_NAME, PARENT_ID)
                         values ( 'A', '123412', 'SDFSG', 'DDS');                     " ORGAN_ID is primary key
    " If the data 'A' has already exist in database ORG_UNIT, it will show error message
    " But if I use :I instead 'A', it will not show error message.
            IF SQL%FOUND THEN
               COMMIT;
            END IF;
          END;
        endexec.
        EXEC SQL.
          SELECT COUNT(*) from ORG_UNIT into :cnt
        ENDEXEC.
        write: / cnt.
    catch cx_sy_native_sql_error into exc_ref.
        error_text = exc_ref->get_text( ).
        write: / error_text.
      catch cx_sql_exception into sqlerr_ref.
        perform handle_sql_exception using sqlerr_ref.
    endtry.
    EXEC SQL.
      disconnect :DBS
    ENDEXEC.
    *enddo.
    *&      Form  handle_sql_exception
    form handle_sql_exception
      using p_sqlerr_ref type ref to cx_sql_exception.
      format color col_negative.
      if p_sqlerr_ref->db_error = 'X'.
        write: / 'SQL error occured:', p_sqlerr_ref->sql_code,
               / p_sqlerr_ref->sql_message.                     "#EC NOTEXT
      else.
        write:
          / 'Error from DBI (details in dev-trace):',
            p_sqlerr_ref->internal_error.                       "#EC NOTEXT
      endif.
    endform.                    "handle_sql_exception
    please help to see the words:
    *" If the data 'A' has already exist in database ORG_UNIT, it will show error message*
    *" But if I use :I instead 'A', it will not show error message.*
    in the program.
    Thanks a lot!

    resumption and jer,
    Sorry I cannot format the code for easy reading!
    The page is submitting to itself. See action = \"$uri\". I used the same logic to enter SELECT querries into the database. It pulls and displays data back on the webpage. The code I used for this is below. Compare it with the one above for inserting data into the table.
    <?php
    // connect to oracle
    $username = "xxxxx";
         $paswd = "yyyyy";
         $dbstring = "(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)".
              "(HOST=patriot.gmu.edu)(PORT=1521))".
              "(CONNECT_DATA=(SID=COSC)))";
         $db_conn = ocilogon($username, $paswd, $dbstring);
    // username and password will be unset if they weren't passed,
    // or if they were wrong
    if( !isset($query)) {
    // just print form asking for account details
    echo "<form action=\"$uri\" method=post>\n";
    echo "<p>Enter Query: ";
    echo "<input type=text size=100 maxlength=200 name=query value=\"$query\">\n";
    echo "<br><input type=submit name=submit value=Submit>\n";
    echo "</form>\n";
    exit;
    // remove unwanted slashes from the query
    $query = stripslashes($query);
    // run the query
    $stmt = OCIParse($db_conn, $query);
    OCIExecute($stmt, OCI_DEFAULT);
    // Open the HTML table.
    print '<table border="1" cellspacing="0" cellpadding="3">';
    // Read fetched headers.
    print '<tr>';
    for ($i = 1;$i <= ocinumcols($stmt);$i++)
    print '<td class="e">'.ocicolumnname($stmt,$i).'</td>';
    print '</tr>';
    // Read fetched data.
    while (ocifetch($stmt))
    // Print open and close HTML row tags and columns data.
    print '<tr>';
    for ($i = 1;$i <= ocinumcols($stmt);$i++)
    print '<td class="v">'.ociresult($stmt,$i).'</td>';
    print '</tr>';
    // Close the HTML table.
    print '</table>';
    OCIFreeStatement($stmt);
    OCILogoff($db_conn);
    ?>

  • Use Spry to insert data into a database?

    I'm new to Spry, so I have a question:
    Can I use Spry to insert data into a MySQL database without
    reloading the site?
    Reading data from XML file works fine, but I don't know if
    writing is possible..

    I don't get it... I tried this:
    <script type="text/javascript" src="spry/xpath.js"
    /></script>
    <script type="text/javascript" src="spry/SpryData.js"
    /></script>
    <script type="text/javascript">
    /* <![CDATA[ */
    function subscribe() {
    var subscribe;
    var info =
    document.getElementById("subscription_info").value;
    if (document.getElementsByName("subscription")[0].checked ==
    true) {
    subscribe = "ja";
    else {
    subscribe = "nein";
    var dsSubscribe = new
    Spry.Data.XMLDataSet("include/inc_subscribe.php?subscribe="+subscribe+"&info="+info+"&sit e=<?=$_GET['site'];?>",
    "subscription/ok");
    /* ]]> */
    </script>
    <div id="infos">
    <input type="radio" name="subscription" value="ja" />
    dabei
    <input type="radio" name="subscription" value="nein"
    /> nicht dabei
    <input type='text' class='text'
    id='subscription_info_text' />
    <input type='submit' id="subscription_submit"
    value='Eintragen' onClick="subscribe()" />
    </div>
    But the data isn't inserted into the mysql database. When I
    start the php script directly, it works, so I think it's not a php
    problem.

  • How to insert data into local database from oracle server

    I am new in C#.
    I am trying to design a local database in my C# project and I am trying to sync my database with our oracle server. I can login using oracle server. But I can't insert data into my local database from oracle server.
    anybody can help me ...............
    thanks..............................

    You can use SSIS package for that
    Start a new Integration Services project in Business  Intelligence Development Studio/ SSDT. Add a new SSIS package with a data flow task. Add a OLEDB source to connect to Oracle server and add a OLEDB Destination to connect to your local database.
    Select tables for source and destination. On executing package source data will get transferred to your local database.
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • Insert data into a database table from a string

    Hi,
    I am need to insert data into a table from  the text file. I pull the data into an internal table using GUI_UPLoad. I read the data into an internal table and concatenate data into a string. I need to do this because the structure of the table is dynamic. it is used to upload a series of tables each with different structure, But the data is stored in the string v_tabledata.  How to do that.
    after uploading the data  from the textt file into a table
    oop at i_final.
       v_tabname = i_final-table_name.
      concatenate i_final-table_rec1 i_final-table_rec2 i_final-table_rec3
                  i_final-table_rec4 i_final-table_rec5 into v_tabledata.
    from  'v_table data'  i need to upload the data into a table and the structue of the table is known dynamically. Any thoughts using field symbols?
    Thanks,
    VG

    Let me see if I've understood your issue
    You have a file to be uploaded into an internal table but this file has many different layouts and then you don't know how to link these fields with the internal table...is it your issue?
    Then you've read the internal table, you've sent it to a string divided by space or something else and then are you trying to read this string to send it to a table?
    We could read the standard tables which maintain the program names, table names etc... (DD* tables, as the DD03L table) and then create some rules...
    We could create a parameter table to read your file/table dynamically...
    Please, try to rewrite in other words your problem...because there are a lot of ways to achieve your issue...
    Alexandre Mendes

  • How  to  insert data into custom database table from an hcsf

    i want to insert data into database table that i have created from an hcsf.
    example :
    say i have created a table in oracle database and i hav created a hcsf file.now i want that when somebody fills in that hcsf and click submit ,i want that entries should be updated in my database table.
    plzzz reply ASAP(it's urgent)

    you'll need a bit of Java code... extract the data during a check-in filter, and insert it into the database.
    check out the "DataAccess" component in the HowToComponents for query-running examples, and the "DynamicPrefix" component for a check-in filter example.
    I have older copies here:
    http://bezzotech.com/library

  • Insert data into mySQL with BPEL

    I want to do an insert/update on a table in mySQL. In step 4 of the adapter configuration wizard I select "Perform operation on table" and choose insert/update when I click on next I can see all the tables in the mySQL database but if I choose the table I want to insert to I get the following error message:
    "The following error occurred:
    XX.XX.ZA.tablename
    Please consult the Database Adapter documentation for detailed instructions on how to fix this problem."
    We use BPEL 10.1.2.0.2 and Jdeveloper 10.1.2.3.0
    Thanks
    Roald

    Hi,
    In the same step 4, please try the option pure SQL and enter the query, "select count(*) from tablename"
    Please check whether this is working fine ? And also, were you able to see the records in the JDeveloper IDE with the connecting to the MySQL Database...
    And aslo, the data source you have created for accessing the mySQL Database in weblogic console, what username credentials have you given ? please check whether that username has privileges to the table you want to select ? And , the table you are selecting is under the same username schema or another schema ? If it is a different schema , then find out whether the username you have given while creating the data source has read/write privileges to that table ?
    Thanks,
    N

  • How to insert Date into a database field ?

    Hi,
    There is a field in a table with type = Date/Time,
    This is today's date:
    Date today = new Date( );
    SimpleDateFormat formatter = new SimpleDateFormat("MM/dd/yyyy");
    String today_string = formatter.format(today);
    Then, I try to insert this today_string into that field, but failed. Also try different ways with no luck. Anybody knows the trick ?
    Thanks in advance !
    Philip

    Create an insert statement in a PreparedStatement and use the setTimestamp method to fill in the current date and time. Search the JDBC forum for more details, this has been asked several times before.

  • Parsing XML data into MySQL database

    I need to parse data from an xml document rsiding on amother
    server into a mysql database residing on my server, so that I can
    pull data into a php site.
    Any help? Mybe there's a commercial script or something?
    I would also need to update the data daily
    Thanks!!

    Check this out.
    http://download-west.oracle.com/docs/cd/B10501_01/appdev.920/a96612/d_xmlsav.htm#1008593

  • How to insert date into oracle database

    Hi, there,
    I want to insert date information to oracle database in a jsp page using JSTL. but always got wrong message:
    javax.servlet.jsp.JspException:
    INSERT INTO DATE_TEST
    (date_default,date_short,date_medium)
    values(?,?,?)
    : Invalid column type
    I don't know how to convert java date type to oracle date type or vice versa. the following is the source code(all the fields of DATE_DEFAULT,DATE_SHORT,DATE_MEDIUM are oracle date type. and even I want to insert d instead d1, I got the same wrong message)
    <%@ page contentType="text/html;charset=windows-1252"%>
    <%@ page import="java.util.*" %>
    <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
    <%@ taglib prefix="sql" uri="http://java.sun.com/jstl/sql" %>
    <%@ taglib prefix="fmt" uri="http://java.sun.com/jstl/fmt" %>
    <%
    Calendar now;
    Calendar rightNow = Calendar.getInstance();
    %>
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
    <title>
    Hello World
    </title>
    </head>
    <body>
    <h2>
    The current time is:
    </h2>
    <p>
    <%= new java.util.Date() %></p>
    <%
    java.util.Date d=new java.util.Date();
    java.sql.Date d1=new java.sql.Date(d.getYear(),d.getMonth(),d.getDate());
    out.print(d1.toString());
    %>
    <sql:update>
    INSERT INTO DATE_TEST
    (DATE_DEFAULT,DATE_SHORT,DATE_MEDIUM)
    VALUES(?,?,?)
    <sql:dateParam value="${d}" type="date" />
    <sql:dateParam value="${d}" type="date" />
    <sql:dateParam value="${d}" type="date" />
    </sql:update>
    </body>
    </html>
    thank you very much for the great help!!

    Hi, there,
    I want to insert date information to oracle database in a jsp page using JSTL. but always got wrong message:
    javax.servlet.jsp.JspException:
    INSERT INTO DATE_TEST
    (date_default,date_short,date_medium)
    values(?,?,?)
    : Invalid column type
    I don't know how to convert java date type to oracle date type or vice versa. the following is the source code(all the fields of DATE_DEFAULT,DATE_SHORT,DATE_MEDIUM are oracle date type. and even I want to insert d instead d1, I got the same wrong message)
    <%@ page contentType="text/html;charset=windows-1252"%>
    <%@ page import="java.util.*" %>
    <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
    <%@ taglib prefix="sql" uri="http://java.sun.com/jstl/sql" %>
    <%@ taglib prefix="fmt" uri="http://java.sun.com/jstl/fmt" %>
    <%
    Calendar now;
    Calendar rightNow = Calendar.getInstance();
    %>
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
    <title>
    Hello World
    </title>
    </head>
    <body>
    <h2>
    The current time is:
    </h2>
    <p>
    <%= new java.util.Date() %></p>
    <%
    java.util.Date d=new java.util.Date();
    java.sql.Date d1=new java.sql.Date(d.getYear(),d.getMonth(),d.getDate());
    out.print(d1.toString());
    %>
    <sql:update>
    INSERT INTO DATE_TEST
    (DATE_DEFAULT,DATE_SHORT,DATE_MEDIUM)
    VALUES(?,?,?)
    <sql:dateParam value="${d}" type="date" />
    <sql:dateParam value="${d}" type="date" />
    <sql:dateParam value="${d}" type="date" />
    </sql:update>
    </body>
    </html>
    thank you very much for the great help!!

Maybe you are looking for

  • Firefox constantly crashes on startup

    Firefox is continually crashing on me. It opens for a few seconds to tell me it can't open my tabs, and then crashes. My Mac OSX is up-to-date, and I ran a virus scan yesterday (before I started having problems with Firefox) and it found nothing. I'v

  • Itunes music from 2 apple IDs on 1 iPhone

    Hi - I have two separate Apple IDs and while I understand I can't merge them, can I get the music from both into one itunes library and then sync my iphone with this library. I just want to be able to listen to music from my new and older account on

  • My ipod is poo

    ok so i plugged 40gb ipod into my mac OSX using the docking station like normal. I had virtually no battery but itunes recognised it immediatly and started updating my ipod. All is fine then i hear a beeping sound, itunes froze, then a message came o

  • 10.4.11 and No Safari 3.0

    I installed 10.4.11 and things are working fine. However, Safari is still 2.0.4. Why didn't 3.0 install? But from what I'm hearing about issues, I'm glad it didn't. Joe D

  • Can a page-turning SWF to PDF have navigation?

    I'm working on creating a flip-book PDF which needs a Replay button or some other way to get back to the first page OTHER than laboriously clicking back through every single page. In CS4 InDesign, files with Page Turn transistion must be exported as