Use scanner or/and camera to insert image into oracle database BLOB feild

can any body show how i can do these? send me an example to do this?
notice: i'am using oracle form 6i & oracle databse 10g
best regards
hamdan
Edited by: user633386 on 05/07/2011 11:57 م

It's been discussed now and then. Hope this helps:
Insert Picture (image) using oracle forms
Looks like a keyword to search on is read_image_file
This all assumes that we know the name of the file.

Similar Messages

  • How to insert images into oracle databse......

    hi,
    i have to insert images into oracle database..
    but we have a procedure to insert images into oracle database..
    how to execute procedure.
    my images file is on desktop.
    i am using ubuntu linux 8.04..
    here i am attaching code of my procedure
    create or replace PROCEDURE INSERT_BLOB(filE_namE IN VARCHAR2,dir_name varchar2)
    IS
    tmp number;
    f_lob bfile;
    b_lob blob;
    BEGIN
    dbms_output.put_line('INSERT BLOB Program Starts');
    dbms_output.put_line('--------------------------');
    dbms_output.put_line('File Name :'||filE_namE);
    dbms_output.put_line('--------------------------');
    UPDATE photograph SET image=empty_blob()
    WHERE file_name =filE_namE
    returning image INTO b_lob;
    f_lob := bfilename( 'BIS_IMAGE_WORKSPACE',filE_namE);
    dbms_lob.fileopen(f_lob,dbms_lob.file_readonly);
    --dbms_lob.loadfromfile(b_lob,f_lob,dbms_lob.getlength(f_lob));              
    insert into photograph values (111,user,sysdate,b_lob);
    dbms_lob.fileclose(f_lob);
    dbms_output.put_line('BLOB Successfully Inserted');
    dbms_output.put_line('--------------------------');
    commit;
    dbms_output.put_line('File length is: '||dbms_lob.getlength( f_lob));
    dbms_output.put_line('Loaded length is: '||dbms_lob.getlength(b_lob));
    dbms_output.put_line('BLOB Committed.Program Ends');
    dbms_output.put_line('--------------------------');
    END inserT_bloB;
    warm regerds
    pydiraju
    please solve my problem
    thanks in advance.......

    thank you
    but i am getting the following errors.
    i connected as dba and created directory on /home/pydiraju/Desktop/PHOTO_DIR'
    and i gave all permissions to scott user.
    but it not working . it gives following errors.
    ERROR at line 1:
    ORA-22288: file or LOB operation FILEOPEN failed
    Permission denied
    ORA-06512: at "SYS.DBMS_LOB", line 523
    ORA-06512: at "SCOTT.LOAD_FILE", line 28
    ORA-06512: at line 1
    Warm regards,
    Pydiraju.P
    Mobile: +91 - 9912380544

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

  • Import Raster image into oracle database

    I am trying to load raster image into oracle spatial 10g. It is a tiff file. I am using Oracle Mapbuilder that comes with oc4j.
    I use Tools Menu -> Import Image to import that image into an oracle table.
    But I get error -
    java.lang.NoSuchMethodError: javax.media.jai.RenderedOp.getNumBands()I
    i am using java 1.5 and i have set path to java media library - jai_codec.jar, jai_codec_depl.jar , jai_core.jar, jai_core_depl.jar
    Pl help..
    Thanks

    ooee i solved it...
    i used jre 1.6 and it works fine...

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

  • Using iMovie 11 and can't insert photos into story line?

    I just got IMovie 11 and the browsers won't highlight when trying to create a movie.  I can't insert photos into the storyline

    If I had to guess, and this merely based on reading iMovie Discussion Group threads, I would say sometimes Themes/Trailers/Animated Titles have problems. Not to say they cannot be used, but they can be the source of crashes and other bad behavior if something gets corrupted in them. Animated titles (in a regular iMovie Project) can cause instability and crashes. So I would say, some of those Themes may not be reliable and have pieces or parts built into the template that are causing this issue.
    If you wanted to try doing a bit of preventive maintenance try this:
    Go to Applications > Utilities > Disk Utility and launch this program
    Click on the Repair button under Disk Permissions and let it run until it finishes. Reboot the Mac, and open iMovie see if you get any different behavior out of iMovie with one of those failed Project Theme movies if you have one still available to open and look at. I won't say this is going to fix it, but it's sometimes can help. Also there's an iMovie preferences file that can get corrupted and lead to problems. To find the iMovie prefs:
    Go to the Desktop look for the Go Menu at the top menu bar. Hold down the Option key and click on the Go menu. Click on Library > Preferences.
    In the list of files there are: com.apple.iMovieApp.plist and also com.apple.iApps.plist
    Drag both of those to the trash and relaunch iMovie. See if that preference file deletion helps.

  • I receive error when I try to insert Image to Oracle Database v.9i

    My Error is :
    java.sql.SQLException: ORA-00600: internal error code, arguments: [ttcgcshnd-1], [0], [], [], [], []
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:114)
    at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:208)
    at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:542)
    at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1311)
    at oracle.jdbc.ttc7TTC7Protocol.fetch(TTC7Protocol.java:797)
    at oracle.jdbc.driver.OracleStatement.doExecuteQuery(OracleStatement.java:1608)
    at oracle.jdbc.driver.OracleStatement.doExecute(OracleStatement..java:1758)
    at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1805)
    at oracle.jdbc.driver.OracleStatement.executeQuery(OracleStatement.java:410)
    and my code is:
    URL url = null;
         InputStream in = null;
         Statement stmt = null;
         OutputStream out = null;
         try {
         url = new URL("file://D:/MyJava~1/classes/javalogo.gif");
              in = url.openStream();
              stmt = con.createStatement();
              // Create the table
              stmt.execute ("create table ImageTable (count varchar2(20), image BLOB)");
              System.out.println("Table created ...");
              // create a blob entry in the table
              stmt.execute("insert into ImageTable values ('two', empty_blob())");
              stmt.execute("commit");
              String cmd = "select image from ImageTable for update";
    /* error this command/*
              ResultSet rset = stmt.executeQuery(cmd);
              System.out.println("Success execute command.");
              while (rset.next()) {
                   //get the Blob locator
                   blob = ((OracleResultSet)rset).getBLOB(1);
                   System.out.println("Get the BLOB locator");
              //get ready to accept binary file
              out = blob.getBinaryOutputStream();
              int chunk = blob.getChunkSize();
              System.out.print("The chunk size is " + chunk);
              byte buffer[]= new byte[chunk];
              int length;
              while ((length = in.read(buffer)) != -1) {
                   out.write(buffer, 0, length); //image file saved.
              con.close();
              out.close();
              stmt.close();
    thank you for your kind
         

    You should try using PreparedStatement instead of Statement while inserting the image - one of the methods like setBytes(. .), setBlob() or setBinaryStatement() of the PreparedStatement should do the trick..
    The setBytes( ) is inefficient in terms of memory -esp for large images -better is to use setBinaryStream( ).
    Shantanu

  • Need help on interface to store images into oracle database using forms 6i

    i am using forms 6i and oracle 8i. i am able to store .jpg and other picture files into data base.now my problem is how show and store the CAD/CAM drawings using forms. can any one help me please. is higher version is providing any new facility for this purpose?
    thank you

    thanks for your help.
    i am using client/server based application and cad/cam software was also installed on it. helper application means, the cad/cam software should provide some controls to view the drawings in other applications? am i correct.

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

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

  • Using local/testing server with cs5 inserting images look fine in the split screen but do not show

    Hi
    If I open example: header.php and insert any photo jpeg/.html ecs i can see the images in the split screen but not in the browser if i save then refresh. I am able to make any change to the code ecs. and they are reflected just fine. I have tried this with my fireworks images .html and when that did not work i tried a strait jpeg off the desktop. This all did not work. I have deleted the local server then step by step created a new one via devnet instruction. This did not work! everything looks fine i even tried in 3 sep browsers with 0 luck....There is no remote server connected at this time because i am making a child theme for my current site. After all changes are done we will the ftp the word press files to site and change.
    Ps i even started over from scratch with 0 positive affects....

    After a lot of pain!!!!!!! the issue is fixed lol After 3 weeks I have overlooked the obvious !!! so the simple fix was the path of the image. Yes i feel stupid 10 years in lol....
    Apparently dreamweaver cs 5 will not use the full path when inserting images into the page example: If you drag the image out of your assets folder or however you do it, DW will give you a path like this <img src="images/glass.jpg" width="800" height="729"> This is not the full path and when your pist!!! you cant see things like that ;( so the image path should look like this:
    <img src="wp-content/themes/adszoom/images/glass.jpg" width="800" height="729">
    also in the html files example of bad then good!
    <!--======================== BEGIN COPYING THE HTML HERE ==========================-->
    <img name="navigation" src="navigation.gif" width="1000" height="50" border="0" usemap="#m_navigation" alt="">
    <map name="m_navigation">
      <area shape="poly" coords="804,7,994,7,994,47,804,47,804,7" href="http://adszoom.com/699-2/" title="SEARCH BY CATEGORIES FOR CLASSIFIED ADS" alt="SEARCH BY CATEGORIES FOR CLASSIFIED ADS" >
      <area shape="poly" coords="602,8,792,8,792,48,602,48,602,8" href="http://adszoom.com/wp-admin/edit.php/" title="VIEW OR EDIT YOUR CLASSIFIED ADS" alt="VIEW OR EDIT YOUR CLASSIFIED ADS" >
      <area shape="poly" coords="405,8,595,8,595,48,405,48,405,8" href="http://adszoom.com/post-an-ad/" title="NEW CLASSIFIED AD POST" alt="NEW CLASSIFIED AD POST" >
      <area shape="poly" coords="206,8,396,8,396,48,206,48,206,8" href="http://adszoom.com/help/" title="HELP WITH YOUR CLASSIFIED ADS" alt="HELP WITH YOUR CLASSIFIED ADS" >
      <area shape="poly" coords="3,9,193,9,193,49,3,49,3,9" href="http://adszoom.com/" title="HOME VIEW CLASSIFIED ADS" alt="HOME VIEW CLASSIFIED ADS" >
    </map>
    <!--========================= STOP COPYING THE HTML HERE =========================-->
    </body>
    NOW THE GOOD!
    <!--======================== BEGIN COPYING THE HTML HERE ==========================-->
    <img name="navigation" src="wp-content/themes/adszoom/images/navigation.gif" width="1000" height="50" border="0" usemap="#m_navigation" alt="">
    <map name="m_navigation">
      <area shape="poly" coords="804,7,994,7,994,47,804,47,804,7" href="http://adszoom.com/699-2/" title="SEARCH BY CATEGORIES FOR CLASSIFIED ADS" alt="SEARCH BY CATEGORIES FOR CLASSIFIED ADS" >
      <area shape="poly" coords="602,8,792,8,792,48,602,48,602,8" href="http://adszoom.com/wp-admin/edit.php/" title="VIEW OR EDIT YOUR CLASSIFIED ADS" alt="VIEW OR EDIT YOUR CLASSIFIED ADS" >
      <area shape="poly" coords="405,8,595,8,595,48,405,48,405,8" href="http://adszoom.com/post-an-ad/" title="NEW CLASSIFIED AD POST" alt="NEW CLASSIFIED AD POST" >
      <area shape="poly" coords="206,8,396,8,396,48,206,48,206,8" href="http://adszoom.com/help/" title="HELP WITH YOUR CLASSIFIED ADS" alt="HELP WITH YOUR CLASSIFIED ADS" >
      <area shape="poly" coords="3,9,193,9,193,49,3,49,3,9" href="http://adszoom.com/" title="HOME VIEW CLASSIFIED ADS" alt="HOME VIEW CLASSIFIED ADS" >
    </map>
    <!--========================= STOP COPYING THE HTML HERE =========================-->
    </body>
    THIS LINE IS YOUR ISSUE
    <img name="navigation" src="wp-content/themes/adszoom/images/navigation.gif" width="1000" height="50" border="0" usemap="#m_navigation" alt="">
    Ok thanks and if there are any issues with dw please ask: [email protected]

  • Insert image into a .pdf using InDesign

    Can I insert image into a .pdf using InDesign....

    You can place a PDF as an image in InDesign, then add more content and export a new PDF.
    There are also commercial plugins available that will allow you to open a PDF as editable objects in InDesign.

  • I am new to iMovies.  When I make a video using the mic and camera in my Macbook Pro, the audio and video are not in synch.  Very annoying.  How can I fix this?

    I am new to iMovies.  When I make a video using the mic and camera in my Macbook Pro, the audio and video are not in synch.  Very annoying.  How can I fix this?

    DVD drives read the bottom of the disk, not the top. Smooth out the paper & try again.

Maybe you are looking for