(inserting values into a database using a Checkbox) HELP!!!!!!!!!!!!!!!

Can anyone help me out ???
I am getting some trouble with using multiple check boxes to store the information in a database (MS ACESS)
Each checkBox has multiple values in them.(3).
1)Should they have similar names for each one?
I am also getting an error saying cannot resolve symbol stating about pnumber,itemname,price
Can you also tell me that if my query statements are correct??
I want to insert into the database multiple values of each checkboxes which are checked.
Thanks!!!!!!!
<!---------------------------------------------html PART--------------------------------------------------------------------------------------->
     <form method="POST" action="http://localhost:8080/cvc/jsp/addCart.jsp">
          <table align = "center" border="2" width="50%">
          <TBODY>
<%               
               getProducts.next();
               pnumber = getProducts.getInt(1); //this part works since I am seeing it displayed in a table
               itemname = getProducts.getString(2);                         
               price = getProducts.getFloat(3);
%>               
               <tr>               
               <td><img align= "centre" border=0 src="http://localhost:8080/cvc/ASA Technologies\mp3.jpg" /></td><td><%=itemname%></td><td align="right"><%=price%></td>
               <td align="center"><input type="checkbox" name="items" value="<%=pnumber+":"+itemname+":"+price+":"%>" </input></td> //????????????
<!--------------------------------------JSP PART-------------------------------------------------------------------------------------------------------------------->
<%@ page import="java.util.*, java.io.*, java.sql.*" %>
<%
String insert;
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
String sourceURL = new String("jdbc:odbc:ASA");
Connection con = null;
con = DriverManager.getConnection(sourceURL,"","");
java.sql.Statement statement = con.createStatement();
while ( request.getParameter("pnumber+itemname+price") !=null)
insert = "insert into Cart VALUES( ' "+pnumber+" ' ," + " '"+itemname+ " ' ,"+ " ' "+price+ " ' )"; //getting the error here :cannot resolve symbols
statement.executeUpdate(insert);
%>

Syntax of insert was wrong..
while ( request.getParameter("pnumber+itemname+price") !=null)
insert = "insert into Cart VALUES( ' "+pnumber+" ' ," + " '"+itemname+ " ' ,"+ " ' "+price+ " ' )"; //getting the error here :cannot resolve symbols
statement.executeUpdate(insert);
try this........
Column1, Column2, Column3 are the field names of your table Cart....
..changed it to your original fieldnames...
insert = "insert into Cart (Column1,Column2,Column3) VALUES( ' "+pnumber+" ' ," + " '"+itemname+ " ' ,"+ " ' "+price+ " ' )";

Similar Messages

  • 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);
    ?>

  • Unable to insert rows into ORACLE database using ABAP code

    Hai,
    I am facing problem while creating a table in Oracle database with 15 attributes in a table. To create a table I am using the classes:
                      cl_sql_connection  -
    > to create the connection           
                      cl_sql_statement  -
    > to execute the query
    This I used by reffering the SAP program ADBC_DEMO. Without any trouble I am able to create a Table with 6 attributes by following the same procedure in ABCD_DEMO program but the same is not working for the table with 15 attributes .
    Please help me.
    Regards,
    Swetha

    Hai,
    here is my code.
    DATA: V_con_name TYPE dbcon-con_name,
          con_ref TYPE REF TO cl_sql_connection,
          sqlerr_ref TYPE REF TO cx_sql_exception,
          c_tabname  TYPE string VALUE `TO_DETAILS`,
          c_coldefs  TYPE string.
    DATA: IT_ORA LIKE ZVOP_X_ORA_UPDATE OCCURS 0 WITH HEADER LINE.
       V_CON_NAME = 'TVL-DSS-01'.
       concatenate '(LGNUM CHAR(3) primary key,'
                     'TANUM VARCHAR2(10),'
                     'FLAG  CHAR(1),'
                     'BDATU timestamp(3),'
                     'TAPOS VARCHAR2(4),'
                     'MATNR CHAR(18))'
                      'VLQNR VARCHAR2(10),'
                      'VLPLA CHAR(10),'
                      'VLBER CHAR(3),'
                      'NLPLA CHAR(10),'
                      'NLBER CHAR(3),'
                      'VDATE DATE(3) ,'
                      'BNAME CHAR(12),'
                      'VTIME DATE(4),'
                      'PROTYPEFLAG CHAR(1),'
                      'PROCOMFLAG  CHAR(1))'
                into c_coldefs separated by space  .
      TRY.
        PERFORM: CONNECT USING V_CON_NAME CON_REF,
                 CREATE_TABLE USING con_ref c_tabname c_coldefs.
          CATCH cx_sql_exception INTO sqlerr_ref.
            TB_ERROR-MESSAGE = SQLERR_REF->SQL_MESSAGE.
            APPEND TB_ERROR. CLEAR TB_ERROR.
    ENDTRY.
    form create
    form CONNECT using   p_con_name TYPE dbcon-con_name
                         p_con_ref  TYPE REF TO cl_sql_connection
                 RAISING cx_sql_exception.
      p_con_ref = cl_sql_connection=>get_connection( p_con_name ).
    endform.                    " CONNECT
    form create
    form   CREATE_TABLE USING   p_con_ref TYPE REF TO cl_sql_connection
                              p_tabname TYPE string
                              p_coldefs TYPE string
                      RAISING cx_sql_exception.
       DATA:
            l_sqlerr_ref TYPE REF TO cx_sql_exception,
            l_stmt       TYPE string,
            l_stmt_ref   TYPE REF TO cl_sql_statement.
    create a statement object
       l_stmt_ref = p_con_ref->create_statement( ).
    create the statement string
       CONCATENATE
         'create table' p_tabname p_coldefs
         INTO l_stmt SEPARATED BY space.
    execute the DDL command; catch the exception in order to handle the
    case if the table already exists
        TRY.
          l_stmt_ref->execute_ddl( l_stmt ).
        CATCH cx_sql_exception INTO l_sqlerr_ref.
          IF l_sqlerr_ref->dbobject_exists = 'X'
             OR l_sqlerr_ref->internal_error = 1024.
          table already exists => drop it and try it again
            PERFORM:
              drop_table   USING p_con_ref p_tabname,
              create_table USING p_con_ref p_tabname p_coldefs.
          ELSE.
            RAISE EXCEPTION l_sqlerr_ref.
          ENDIF.
      ENDTRY.
    endform.                    " CREATE_TABLE
    please do help me
    Regards,
    Swetha

  • 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?

  • Re: Insert data into oracle database using a PHP form

    Hai its different for me, i want to display a data based on the input from php form. I see and trying your script but it didn't work.
    <?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;
    $data=$_POST;
    stripslashes($data);
    // Select statement
    $query = "SELECT * FROM animal WHERE skin=$data";
    // connect to Oracle
    $username = "xxxxxx";
    $paswd = "xxxxxx";
    $dbstring = "(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)".
    "(HOST=yyyyyyyy)(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);
    $stmt = OCIParse ($db_conn, $sql);
    OCIBindByName ($stmt, ":name", &$data, -1);
    OCIExecute ($stmt);
    OCIFreeStatement($stmt);
    OCILogoff ($db_conn);
    ?>
    Could you please advice me ? whats wrong with that script ?

    What is the error you get? What solutions have you tried already?

  • Issue of inserting greek characters into Oracle database using ICAN505

    Hi All,
    We are currently facing an issue of inserting greek characters into Oracle database using ICAN505.
    We receive a file containing greek characters.The values from the file should be inserted into the database.We are reading the file using file OTD with default encoding.
    The file can contain english characters too other than greek characters.
    The database NLS_CHARACTERSET is AL32UTF8.
    When I insert using an insert statement directly ,the values get inserted properly into the DB table.
    Inserting the same values using code results in improper characters getting inserted into the table in the database.
    Please help....
    Thanks in advance !!

    Globalization forum?
    Globalization Support
    It works for SQL Developer, which does not depend on NLS_LANG, so I suspect a problem with your NLS settings.

  • Inserting Multiple Images into oracle database using JDBC

    I wanted to insert multiple images into database using JDBC by reading it from the file... and i am passing photos.txt(my text file) as an input parameter... I have inserted all the values into the database except for the image part... this is my content of photos.txt file and i have copied all the images into the folder
    *" C:\\photos "*
    *1,in1.jpg,108,19,in-n-out*
    *2,in2.jpg,187,21,in-n-out*
    *3,in3.jpg,308,41,in-n-out*
    *4,in4.jpg,477,52,in-n-out*
    *5,in5.jpg,530,50,in-n-out*
    and i want to store in1.jpg,in2.jpg,in3.jpg,in4.jpg,in5.jpg into the oracle databse using JDBC.... i have tried a lot using BLOB column.... and i have created my table as
    CREATE TABLE PHOTO(
    ID NUMBER NOT NULL PRIMARY KEY ,
    Name BLOB,
    X DOUBLE PRECISION,
    Y DOUBLE PRECISION,
    Tags VARCHAR2(40)
      try {                 // for restaurant System.out.println();System.out.println();System.out.println(); System.out.print("  Creating Statement for Photo...\n");             stmt2 = con.createStatement ();                       stmt2.executeUpdate("delete from PHOTO"); stmt2.executeUpdate("commit"); PreparedStatement stmt3 = con.prepareStatement ("INSERT INTO PHOTO VALUES (?, ?, ?, ?, ?)");             System.out.print("  Create FileReader Object for file: " + inputFileName1 + "...\n");             FileReader inputFileReader2 = new FileReader(inputFileName1);             System.out.print("  Create BufferedReader Object for FileReader Object...\n");             BufferedReader inputStream2  = new BufferedReader(inputFileReader2);             String inLine2 = null;                         String[] tokens; //            String[] imageFilenames = {"c:\\photos\\in1.jpg","c:\\photos\\in2.jpg","c:\\photos\\in3.jpg","c:\\photos\\in4.jpg","c:\\photos\\in5.jpg", //  "c:\\photos\\in6.jpg","c:\\photos\\in7.jpg","c:\\photos\\in8.jpg","c:\\photos\\in9.jpg","c:\\photos\\in10.jpg","c:\\photos\\arb1.jpg","c:\\photos\\arb2.jpg", //  "c:\\photos\\arb3.jpg","c:\\photos\\arb4.jpg","c:\\photos\\arb5.jpg","c:\\photos\\den1.jpg","c:\\photos\\den2.jpg","c:\\photos\\den3.jpg", //  "c:\\photos\\den4.jpg","c:\\photos\\den5.jpg","c:\\photos\\hop1.jpg","c:\\photos\\hop2.jpg","c:\\photos\\hop3.jpg","c:\\photos\\hop4.jpg","c:\\photos\\hop5.jpg"};               File file = new File("C:\\photos\\in1.jpg");            \\ ( Just for example  )           FileInputStream fs = new FileInputStream(file);                         while ((inLine2 = inputStream2.readLine()) != null) {               tokens= inLine2.split(",");             st2 = new StringTokenizer(inLine2, DELIM);                                                             stmt3.setString(1, tokens[0]);               stmt3.setBinaryStream(2, fs, (int)(file.length()));               stmt3.setString(3, tokens[2]);               stmt3.setString(4, tokens[3]);               stmt3.setString(5, tokens[4]);               stmt3.execute(); //execute the prepared statement               stmt3.clearParameters(); 
    As i am able to enter one image file by above code in1.jpg in to the oracle database.... but i am not able to insert all the image file in to the database.....do tell me what should i do.... and can you give me the example on the basis of the above code of mine...
    do reply as soon as possible..

    jwenting wrote:
    that depends. Putting the images in BLOBs prevents the file locations stored in the database from getting out of synch with the filesystem when sysadmins decide to reorganise directory structures or "archive" "old" files that noone uses anyway.True, but it really comes down to a business decision (cost-benefit analysis). If you have the bucks, the expertise, and the time, go with the Blobs, otherwise go with the flat files.

  • 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.

  • PHP/MySQL: Get value from one field, subtract 2, multiply by 20,   and insert value into another column on form submit

    Hello all,
    I'm pulling my hair out--thank you for any help you can give
    me.
    I have a form that a person fills out that has a field that
    asks "How
    many visitors including you" and I'd like them to type in a
    number, and
    on submit of the form, have that value -2 multiplied by 20
    and inserted
    into a "total cost" column.
    I'm using the standard DW server behaviors and I've searched
    the
    internet. How do I perform basic math on that value and
    insert it into
    the database?
    If you have any pointers, that would be great.
    Thank you!
    -John

    John R. Lenz wrote:
    > Your code below works great, and I just noticed links to
    your book were
    > available on your web site, and it's in the mail to me.
    Looking forward
    > to it.
    Thanks, hope you find it useful.
    > After the form is posted, I'd like to address the person
    who posted it
    > by their first name and last name, as well as some of
    the details. How
    > would you go about doing this in the best way? Would you
    set a variable
    > and echo it on the 'Thank you' page, or are there better
    ways of doing
    > it with a recordset and filtering it on form submit?
    To pass the details to a thank you page, you would need to
    store the
    information in $_SESSION variables. You could amend the
    earlier script
    like this:
    <?php
    session_start();
    if (isset($_POST['visitors'])) {
    if ($_POST['visitors'] < 3) {
    $num = 0;
    } else {
    $num = $_POST['visitors'] - 2;
    $_POST['total_cost'] = $num * 20;
    $_SESSION['total_cost'] = $_POST['total_cost'];
    $_SESSION['first_name'] = $_POST['first_name'];
    $_SESSION['last_name'] = $_POST['last_name'];
    ?>
    In the thank you page, put the following at the top of the
    page:
    <?php session_start(); ?>
    It must go before anything is output to the browser, so put
    it above the
    DOCTYPE declaration, and make sure there's no space before
    it.
    You can then use the $_SESSION variables in the thank you
    page.
    At the end of the page, add this to clear up the session
    variables:
    <?php
    $_SESSION = array();
    destroy_session();
    ?>
    David Powers, Adobe Community Expert
    Author, "The Essential Guide to Dreamweaver CS3" (friends of
    ED)
    Author, "PHP Solutions" (friends of ED)
    http://foundationphp.com/

  • Error upon inserting data in sql Database using stream analytics job: Datatye error conversion

    I have a data passed into the Event Hubs, queried by stream analytic job inserting it into sql database. Upon running the job, it becomes idle a few seconds after since it has an error:
    Message: Conversion from 0 to System.Boolean failed. 0 was of type - System.Int64.
    Conversion from 0 to System.Boolean failed. 0 was of type - System.Int64. Exception message at level [1], exception number [0], parent exception number [0]: Conversion from 0 to System.Boolean failed. 0 was of type - System.Int64.
    The data type in one of my field(IsHistorical) is Boolean with a value of false. The data type of the column in the sql table where this is to be inserted is of type bit. In this case, it seems that stream analytics could not convert the value "false"
    into a bit data type when inserting in sql table.
    I'm wondering if you already have encountered this problem. Could you help me resolve this problem?
    Thank you.

    Azure Stream Analytics does not have Boolean type. On input we will convert JSON Boolean value to bigint.
    Here is the list of supported types and conversions:
    https://msdn.microsoft.com/en-us/library/azure/dn835065.aspx 
    You  can fix this erro by changing column type from bit to int in SQL table schema.

  • Inserting values into multiple tables in one jsf page with single commit op

    hi all,
    i have two tables ,
    one is parent table and other is child record.
    record details:
    table1:(parent table)
    emplid (primary key)
    empl_name
    table 2:(child table)
    empl id ( Foreign key)
    empl_name ( Foreign key)
    contact_no (primary key)
    my senario is , i need insert values into both parent and child table in one save option.
    and both the tables will be in one jsf page.
    is this possible to do?
    thanks all,
    regards,
    M vijayalakshmi

    hi,
    i feel my question is not clear.
    let me explain my question clearly.
    1. i have two records
    *1. emp_names*
    attributes of this table is 1.emplid
    2.emp_name.
    emplid is a primary key.
    2. emp_contact
    attributes of this table is 1.emplid
    2. contact_no
    In this table emplid is forigen key from emp_name table
    contact_no is primary key.
    and my senerio is,
    for one emplid there are many contact no.
    in database diagram i have created these two entities. and from that i have generated two views objects.
    now in jsf page ,
    i shd have all fields from both the records.
    wn ever i click on add button , i shd be able to insert one complete row of data to both the tables.
    means,
    emplid
    empl_name
    contact_no.
    and if i click on commit button data shd be insert in both the tables.
    so how to achive this?
    am very beginner to the jdeveloper tool.
    regards,
    m vijayalakshmi.

  • Oracle 10g - Insert value into a self-created table in stored proc

    Hi all,
    Say I'm creating a table using the following logic,
    pc_create_table := 'create global temporary table revs(var1 number(5,0), ..., ...,) on commit preserve rows';
    execute immediate pc_create_table;
    When I'm attempting to insert value into this table (v_var1 is a pre-defined variable),
    pc_insert_value := 'insert into revs(var1, ..., ...,) values (v_var1, ...)'
    execute immediate pc_insert_value;
    I got the following error: "ORA-00984: column not allowed here"
    Any advise on this issue? Thanks a lot

    isaacniu wrote:
    However I got two errors in that line,
    Error(68,6): PL/SQL: SQL Statement ignored
    Error(68,18): PL/SQL: ORA-00942: table or view does not existAnd why do you want your PL/SQL code to run DDLs??
    Its not designed that way, is not a good practice and is strictly not recommended. You can read <a href ="https://forums.oracle.com/forums/profile.jspa?userID=287238">Billy Verreynne's</a> take on this :
    {message:id=10040770}
    To my suprise it's saying the table or view does not exist. According to my logic, the table "revs" created by executing pc_create_table, however it's NOT explicitly declared in other parts of this script, is this where the problem is?The Problem is, SQLs fired using Execute Immediate are evaluated, compiled, parsed and executed at run time. So when you compile procedure pc_create_table, table revs is still not created. Hence you get error when you try inserting rows in it.
    Any advises are appreciated.Get the table created by your DBA, and use insert statement without execute immediate in your procedure.

  • How to insert text into sqlite database from AutoCompleteTextField

    Dear Friends,
                       I want to know that whether it is possible to store values into the database from AutoCompleteText field?????????if it is posssible please explain that how we can do that............Please Reply.......I am waiting for the reply......
    With Love,
    Nithin

    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

  • How to update transaction data automatically into MySQL database using PI

    Dear All,
    With reference to subject matter I want a sincere advice regarding how to update transaction data automatically into MySQL database using PI. Is there any link available where I can get step-by-step process.
    Ex: I have a MYSQL database in my organization. Whenever a delivery created in SAP some fields like DO Number, DO quantity, SO/STO number should get updated in MYSQL database automatically.
    This scenario is related to updation of transactional data into MYSQL DB and I want your suggestions pertaining to same issue.
    Thanks and Regards,
    Chandra Sekhar

    Hi .
    Develop a sceanrio between SAP to Database system,When the data updates in SAP Tables read the data and update it in DATA Base using JDBC adapter,but there will be some delay in updating data in MySQL.
    serach in sdn for IDOC-TOJDBC sceannario,many documents available for the same.
    Regards,
    Raja Sekhar

  • How to insert values into an array of class

    Hello everyone,
    I need help in inserting values into an array of class, which i have read from a file.
    Length of the array is 5. I should insert values one by one into that array.
    If the array is full (if count = 5), then I should split the array into 2 arrays
    and adjust the values to left and right with median.
    I'm getting an ArrayBoundException .. can anybody help me out ?
    Thanks in advance
    Here is my code..........
    import java.util.*;
    import java.io.*;
    public class Tree
         static String second;
         static String first;
         static int count = 5;
         public void insert(int f1,int s1, int c)
              if(c!=0)
                   Record[] rec = new Record[4];
                   for (int i = 0; i < 5; i++)
                          rec[i] = new Record(); 
                   for(int i = 0; i<=4;i++)
                        rec.x = f1;
                        rec[i].y = s1;
              else
                   System.out.println("yes");
         public static void main(String[] args)
              Tree t = new Tree();
              try
                   FileReader fr = new FileReader("output.txt");           // open file
                   BufferedReader br = new BufferedReader(fr);
                   String s;
                   while((s = br.readLine()) != null)
                        StringTokenizer st = new StringTokenizer(s);
                        while(st.hasMoreTokens())
                             first = st.nextToken();
                             second = st.nextToken();
                        //     System.out.println("First-->"+first+" "+"Second-->"+second);
                        int fir = Integer.parseInt(first);
                        int sec = Integer.parseInt(second);
                        t.insert(fir, sec, count);                    
                   fr.close(); // close file           
              catch (IOException e)
    System.out.println("Can't read file");
    class Record
         public int x,y;

    Hi qwedwe.
    Record[] rec = new Record[4];
                   for (int i = 0; i < 5; i++)
                          rec[i] = new Record(); 
                     }Here is your error: you have an array of 4 Records, but you create and (try to) insert 5 Record-instances.... try:
    Record[] rec = new Record[c];
                   for (int i = 0; i < c; i++)
                          rec[i] = new Record(); 
                     }Regards,
    Norman

Maybe you are looking for