Inserting strings in a database

Hello all!
I am trying to insert string values in a database with this metode.
    public void insertData(){
   try{
String url = "jdbc:odbc":"+database;
Connection connection = DriverManager.getConnection(url, user, password);
Statement status = connection.createStatement();
status.executeUpdate("INSERT INTO radiograhy (Title, Red, Green, Blue,"
+ "Hue,Saturation,Value,Color,Path,IdRadiography,Description) VALUES "
+"("+Title+","+Red+","+ Green+","+ Blue +","
+ Hue+","+Saturation+","+Value+","+Color+","+Path+","
+IdRadiography+","+Description+")");
}catch(SQLException e){
e.printStackTrace();
System.out.println(e);
but the metode throws me an exception :
java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver] Syntax error in INSERT INTO statement.

This has actually nothing to do with JDBC, but with basic SQL knowledge.
Print the complete query using System.out.println and try to find out what's wrong with it. Play with it, execute it right on the DB, etcetera. If you don't understand it, then don't bother to read some SQL tutorials how to write clean SQL.
Once you understand SQL, I would also recommend you to use PreparedStatement instead.

Similar Messages

  • Inserting strings over 2000 in length

    Hi,
    I'm trying to populate a database table which contains a long and
    I've been running into two Oracle errors:
    ORA-01462: cannot insert string literals longer than 2000
    characters
    and
    ORA-01489: result of string concatenation is too long
    Can someone point me to documentation or a solution of how you
    can get a 29k string into the database? I have code regarding how
    to use LOBs, but I'm unfamiliar with any stored procedures which
    will allow you to append to a long column with new content. I
    need to use long for the project I am working on.
    Thanks in advance for your help!
    Jill
    null

    Hi Ralf,
    If you read the documentation on
    http://java.sun.com/products/jdbc/index.html you will
    find a statement saying that the JdbcOdbcDriver is
    only for test and experimental use.Yes, but my and other's experiences with the JDBC-ODBC bridge itself are very well.
    Since it is only a bridge over the specific vendor's ODBC driver, you are limited to the capabilities of that.
    But the bridge is not to blame for this.
    For MS products you may reach efforts by updating to an actual MDAC version.
    Nethertheless, with MS ODBC there are some problems.
    Search the driver database (a link is on the above web
    page) for another (commercial) driver. I recommend the
    type 4 driver from i-net.Ok.
    Have you tried out that error David reported with the i-net driver?
    I use JDBC-ODBC with MS SQLServer 2000, actual MDAC, and I get that error with PreparedStatement.
    But it's all ok with a normal statement.
    So if you could test them both with the i-net driver, we would see if it's again the MS ODBC driver.
    Regards,
    Ralf SchumacherI think, I'm not the first you asks this:
    you are not the quick one we saw in Suzuka on Sunday, are you?

  • Inserting String data to BLOB column

    Hi All
    I want to insert String data into BLOB column using DBAdapter - through database procedure.
    anybody can help?
    Regards
    Albin Issac

    I have used utl_raw.cast_to_raw('this is only a test')).But for bigger string I get the error as "string literal too long" do we have any similar function for longer string.
    Thanks,
    -R

  • Oerror while inserting in to 11g database from SOA suite 11g db adaptor

    Hi,
    I am getting following error while inserting in to 11g database from SOA suite 11g database adaptor. Can you please help me on this.
    "{http://schemas.oracle.com/bpel/extension}bindingFault" has been thrown.
    Exception occured when binding was invoked. Exception occured during invocation of JCA binding: "JCA Binding execute of Reference operation 'insert' failed due to: DBWriteInteractionSpec Execute Failed Exception. insert failed. Descriptor name: [LoggerDBInsert.LoggedError]. Caused by java.sql.SQLSyntaxErrorException: ORA-01722: invalid number . ". The invoked JCA adapter raised a resource exception. Please examine the above error message carefully to determine a resolution. ORA-01722: invalid number 1722
    Regards,
    Bharat

    It looks like you try to insert a string-value in a number-column.
    can you check all your assign and their values before you invoke the db-adapter, then you should be able to narrow down the problem.

  • When i insert string text in hebrew i see ?????????

    hi
    when i insert string text in hebrew i see ????????? how to fix it ?
    i work on:
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
    Oracle Developer ver. 2.1.1.64
    thanks

    i try this, but still same problem :(
    my Settings:
    NLS_LANGUAGE     AMERICAN
    NLS_TERRITORY     AMERICA
    NLS_CURRENCY     $
    NLS_ISO_CURRENCY     AMERICA
    NLS_NUMERIC_CHARACTERS     .,
    NLS_CHARACTERSET     IW8MSWIN1255
    NLS_CALENDAR     GREGORIAN
    NLS_DATE_FORMAT     DD-MON-RR
    NLS_DATE_LANGUAGE     AMERICAN
    NLS_SORT     BINARY
    NLS_TIME_FORMAT     HH.MI.SSXFF AM
    NLS_TIMESTAMP_FORMAT     DD-MON-RR HH.MI.SSXFF AM
    NLS_TIME_TZ_FORMAT     HH.MI.SSXFF AM TZR
    NLS_TIMESTAMP_TZ_FORMAT     DD-MON-RR HH.MI.SSXFF AM TZR
    NLS_DUAL_CURRENCY     $
    NLS_COMP     BINARY
    NLS_LENGTH_SEMANTICS     BYTE
    NLS_NCHAR_CONV_EXCP     FALSE
    NLS_NCHAR_CHARACTERSET     AL16UTF16
    NLS_RDBMS_VERSION     11.2.0.1.0

  • Spaces in string updated to database..stored in database as  

    hello! i m facing a wierd problem here. i hope someone can help me as soon as possible..
    the string that i want to insert into the database has spaces..for example "Harley Davidson Shirt". And when this string is added into the database..the record is stored as ====> Harley Davidson Shirt
    i am not sure why the spaces are translated into  . as a result of this..wen i retrieve back the values that i inserted n display it..it still displays as ====> Harley Davidson Shirt <== wid all the   in between
    just in case..this is my servlet code..the servlet that adds the string into the database. the string i am trying to add in this OrdersTemp table in the database is actually retrieved from another table called PetProduct in the same database.
    ==============================================================
    * Created on 2/11/2004
    package servlets;
    import java.io.IOException;
    import javax.servlet.http.*;
    import javax.servlet.*;
    import beans.database.*;
    import java.util.ArrayList;
    import java.util.Iterator;
    import java.util.List;
    * <p>Title: </p>
    * <p>Description: </p>
    * <p>Copyright: Copyright (c) 2004</p>
    * <p>Company: </p>
    * @author Administrator
    * @version
    public class AddToCartServlet1 extends HttpServlet {     
         public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
              processRequest(request, response);     
    private void processRequest(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException{
    String driverName = this.getServletContext().getInitParameter("Access Driver");
    String connectionStr = this.getServletContext().getInitParameter("Access Connection String");
    String mySqlJndiName = this.getServletContext().getInitParameter("MySql JNDI");
    String database = request.getParameter("database");
    DataRetriever db;
    db = new DataRetriever();
    if ( !db.connect(driverName, connectionStr, "admin", "pets") ){                                           
    request.getRequestDispatcher("/WEB-INF/pages/DatabaseError.jsp").forward(request, response);
    String name = null;
    String petProductId[] = request.getParameterValues("add");
    for (int ctr = 0; ctr < petProductId.length; ctr ++) {
         DataRow mama = db.execSelectQuery("Select PetProductID, ProductName From PetProduct where PetProductID = " + petProductId[ctr] + "");
         List list = new ArrayList();
         while ((list = (List)mama.nextRecord()) != null) {
              for (Iterator it = list.iterator(); it.hasNext();) {
                   String id = it.next().toString();
                   name = it.next().toString();
         String sql = "Insert into OrdersTemp(PetProductId, ProductName) VALUES ('" + petProductId[ctr] + "', '" + name + "')";
         db.execUpdateQuery(sql);
    DataRow data = db.execSelectQuery("Select PetProductId, ProductName from OrdersTemp");
    request.getSession().setAttribute("data", data);
    request.getRequestDispatcher("/WEB-INF/pages/PetProductPurchaseConfirmation.jsp").forward(request, response);
    }

    You probably need to change the database encoding. Just a guess since your code doesn't reveal the problem area!!!!!!!!

  • SQLJ with EJB. Do not insert data in the database

    Hi All!
    I4m developing an application using SQLJ and EJB (session beans,
    container managed transactions), and when I try to insert data
    in the database it doesn't work. All goes well (apparently), but
    the changes do not have effect in the DB.
    I've tried to use bean managed transactions, but when I try to
    insert data, I get the error: NOT IN A TRANSACTION. The code of
    the client in the bean managed is the following:
    public class MiEJBCLiente {
    public static void main(String[] args) {
    String namespaceURL
    = "jdbc:oracle:thin:@rabinf56:1521:prinpal";
    String ejbUrl
    = "sess_iiop://rabinf56:2481:prinpal/test/Bean";
    String username = "xxx";
    String password = "xxx";
    // Setup the environment
    Hashtable environment = new Hashtable();
    // Tell JNDI to speak sess_iiop
    environment.put
    (javax.naming.Context.URL_PKG_PREFIXES, "oracle.aurora.jndi");
    // Tell sess_iiop who the user is
    environment.put(Context.SECURITY_PRINCIPAL, username);
    // Tell sess_iiop what the password is
    environment.put(Context.SECURITY_CREDENTIALS, password);
    // Tell sess_iiop to use credential authentication
    environment.put(Context.SECURITY_AUTHENTICATION,
    ServiceCtx.NON_SSL_LOGIN);
    environment.put
    (jdbc_accessURLContextFactory.CONNECTION_URL_PROP, namespaceURL);
    UserTransaction ut = null;
    // Lookup the URL
    hello.MiBeanHome homeInterface = null;
    try {
    Context ic = new InitialContext(environment);
    DriverManager.registerDriver (new
    oracle.jdbc.driver.OracleDriver());
    ut = (UserTransaction)ic.lookup
    ("jdbc_access://test/BeanTrans");
    homeInterface = (hello.MiBeanHome) ic.lookup(ejbUrl);
    catch (SQLException e) {
    // That's it!
    try {
    System.out.println("Creating a new EJB instance");
    hello.MiBean remoteInterface = homeInterface.create();
    ut.begin ();
    remoteInterface.inserta();
    ut.commit();
    catch (Exception e) {
    System.out.println(e.getMessage());
    e.printStackTrace();
    I4m waiting for suggests.
    Thanks in advance...

    Hi,
    Are you sure it's a front-end bug? Try to double check your back-end code.
    If you still believe the bug is in the front-end, try to debug the insertHandler function to see if you are attaching the UserVO properly into the UserEvent.
    Best regards,
    Pablo Souza

  • Can i insert data in my database from a web intelligence report?

    if that's not possible,can I do it from a stored procedure based Universe or with a derived table? Does BusinessObjects in general allow me to execute statements to insert data in my database?

    Hi Erika,
    afaik it is not possible write back to database from web intelligence .
    from dashboards with web services you can achieve this.

  • Error while inserting records in sqlLite database

    Hi all
    I am building a hybrid web app in SMP using phonegap and html.
    I am trying to insert records in sql database but i get an error with an undefined error code
    Please see below :
    function openDatabaseFoo() {
      db = window.openDatabase(clientDBName, clientDBVersion, clientDBDisplayName, clientDBMaxSize);
    function createDBTables() {
      db.transaction(function(tx) {
      // Create mine table
      var fooCreate = 'CREATE TABLE IF NOT EXISTS ' + fooTable+ ' (empNo, empName)';
      tx.executeSql(fooCreate , [],
      function (tx, resultSet) {
                //success
      var msg = 'Sucessfully created';
      alert(msg);
      logSuccessMessage(msg);
                function (err) {
                //error code
                var msg = "Error creating table = " + err.code;
                alert(msg);
                logErrorMessage(msg);
    the creation of tables is happening properly because i am getting a success message in the alerts.
    I am getting the error when i am trying to insert records in the above table
    function insertDataTable(){
    db.transaction(function(tx) {
    var insertSql = 'INSERT INTO ' + fooTable + ' (empNo, empName) VALUES ("1603","baker")';
    tx.executeSql(insertSql, [],
      function (tx, resultSet) {
                //success
      var msg = 'Sucessful insertingdata.';
      alert(msg);
      logSuccessMessage(msg);
                function (err) {
                //error code
                var msg = "Error inserting data sql = " + insertSql + " Error code = " + err.code;
                alert(msg);
                logErrorMessage(msg);
    can some one please help.Also guide me where can i check the sqlLite database logs to see more about the error.
    I would really appreciate the help.I have been onto this since past few days now
    Regards
    Shweta

    What is err.code, or the value of msg when the error occurs?
    Thanks,
    Andrew.

  • Trigger inserting CLOB in remote database

    I ma using an after insert row level trigger to replicate a table into a remote database which has a CLOB column. This is not Oracle Replication, only a trigger. I have attempted numerous paths to achieve this with only partial successes. Is there a way to insert into the remote database when using a CLOB?
    Trigger follows: (will not work when the table array values gets large; I know it will fail on iteration 14)
    CREATE OR REPLACE TRIGGER COPYUP
    INSERT ON "EVENT_DATA" FOR EACH ROW
    DECLARE
    TYPE t_buffer IS TABLE OF VARCHAR2(32500)
    INDEX BY BINARY_INTEGER;
    vcharBuf t_buffer;
    vintReadlength integer := 1;
    vintSendRead integer;
    vintCntr integer := 0;
    vintTotallength integer := 1;
    vintBeginloc integer := 1;
    vclobVal clob;
    vintOffset integer := 32500;
    vintLoop integer;
    vnumError number;
    vcharErrstr varchar2(200);
    BEGIN
    select :new.rawdata into vclobVal from dual;
    vintTotallength := dbms_lob.getlength(vclobVal);
    LOOP
    if vintTotallength > vintOffset then
    if ((vintCntr + 1) * vintOffset) < vintTotallength then
    vintReadlength := vintOffset;
    else
    vintReadlength := (vintTotallength - (vintCntr * vintOffset));
    end if;
    else
    vintReadlength := vintTotallength;
    end if;
    vintSendRead := vintReadlength;
    -- dbms_output.put_line('COPYUP: vintReadlength: ' || vintReadlength || '.');
    -- dbms_output.put_line('COPYUP: vintTotallength: ' || vintTotallength || '.');
    -- dbms_output.put_line('COPYUP: vintCntr: ' || vintCntr || '.');
    -- dbms_output.put_line('COPYUP: vintOffset: ' || vintOffset || '.');
    -- dbms_output.put_line('COPYUP: vintBeginloc: ' || vintBeginloc || '.');
    -- dbms_output.put_line('COPYUP: vintBeginlocSendRead: ' || vintSendRead || '.');
    -- dbms_output.put_line('COPYUP: EventId: ' || :new.eventid || '.');
    dbms_lob.read(vclobVal, vintSendRead, vintBeginloc, vcharBuf(vintCntr));
    exit when ((vintBeginloc + vintReadlength) >= vintTotallength);
    vintCntr := vintCntr + 1;
    vintBeginloc := (vintCntr * vintReadLength) + 1;
    END LOOP;
    IF vintCntr = 0 THEN
    insert into event_data@ncarsdb2
    (ids, ip_address, center,
    detect_date, port, filter,
    rawdata, eventid, lastupdate,
    rulenum, priority, filtername)
    values
    (:new.ids, :new.ip_address, :new.center,
    :new.detect_date, :new.port, :new.filter,
    vcharBuf(0),
    :new.eventid, :new.lastupdate,
    :new.rulenum, :new.priority, :new.filtername);
    ELSIF vintCntr = 1 THEN
    insert into event_data@ncarsdb2
    (ids, ip_address, center,
    detect_date, port, filter,
    rawdata, eventid, lastupdate,
    rulenum, priority, filtername)
    values
    (:new.ids, :new.ip_address, :new.center,
    :new.detect_date, :new.port, :new.filter,
    vcharBuf(0)||vcharBuf(1),
    :new.eventid, :new.lastupdate,
    :new.rulenum, :new.priority, :new.filtername);
    ELSIF vintCntr = 2 THEN
    insert into event_data@ncarsdb2
    (ids, ip_address, center,
    detect_date, port, filter,
    rawdata, eventid, lastupdate,
    rulenum, priority, filtername)
    values
    (:new.ids, :new.ip_address, :new.center,
    :new.detect_date, :new.port, :new.filter,
    vcharBuf(0)||vcharBuf(1)||vcharBuf(2),
    :new.eventid, :new.lastupdate,
    :new.rulenum, :new.priority, :new.filtername);
    ELSIF vintCntr = 3 THEN
    insert into event_data@ncarsdb2
    (ids, ip_address, center,
    detect_date, port, filter,
    rawdata, eventid, lastupdate,
    rulenum, priority, filtername)
    values
    (:new.ids, :new.ip_address, :new.center,
    :new.detect_date, :new.port, :new.filter,
    vcharBuf(0)||vcharBuf(1)||vcharBuf(2)||vcharBuf(3),
    :new.eventid, :new.lastupdate,
    :new.rulenum, :new.priority, :new.filtername);
    ELSIF vintCntr = 4 THEN
    insert into event_data@ncarsdb2
    (ids, ip_address, center,
    detect_date, port, filter,
    rawdata, eventid, lastupdate,
    rulenum, priority, filtername)
    values
    (:new.ids, :new.ip_address, :new.center,
    :new.detect_date, :new.port, :new.filter,
    vcharBuf(0)||vcharBuf(1)||vcharBuf(2)||vcharBuf(3)||vcharBuf(4),
    :new.eventid, :new.lastupdate,
    :new.rulenum, :new.priority, :new.filtername);
    ELSIF vintCntr = 5 THEN
    insert into event_data@ncarsdb2
    (ids, ip_address, center,
    detect_date, port, filter,
    rawdata, eventid, lastupdate,
    rulenum, priority, filtername)
    values
    (:new.ids, :new.ip_address, :new.center,
    :new.detect_date, :new.port, :new.filter,
    vcharBuf(0)||vcharBuf(1)||vcharBuf(2)||vcharBuf(3)||vcharBuf(4)||vcharBuf(5),
    :new.eventid, :new.lastupdate,
    :new.rulenum, :new.priority, :new.filtername);
    ELSIF vintCntr = 6 THEN
    insert into event_data@ncarsdb2
    (ids, ip_address, center,
    detect_date, port, filter,
    rawdata, eventid, lastupdate,
    rulenum, priority, filtername)
    values
    (:new.ids, :new.ip_address, :new.center,
    :new.detect_date, :new.port, :new.filter,
    vcharBuf(0)||vcharBuf(1)||vcharBuf(2)||vcharBuf(3)||vcharBuf(4)||vcharBuf(5)||vcharBuf(6),
    :new.eventid, :new.lastupdate,
    :new.rulenum, :new.priority, :new.filtername);
    ELSIF vintCntr = 7 THEN
    insert into event_data@ncarsdb2
    (ids, ip_address, center,
    detect_date, port, filter,
    rawdata, eventid, lastupdate,
    rulenum, priority, filtername)
    values
    (:new.ids, :new.ip_address, :new.center,
    :new.detect_date, :new.port, :new.filter,
    vcharBuf(0)||vcharBuf(1)||vcharBuf(2)||vcharBuf(3)||vcharBuf(4)||vcharBuf(5)||vcharBuf(6)||vcharBuf(7),
    :new.eventid, :new.lastupdate,
    :new.rulenum, :new.priority, :new.filtername);
    ELSIF vintCntr = 8 THEN
    insert into event_data@ncarsdb2
    (ids, ip_address, center,
    detect_date, port, filter,
    rawdata, eventid, lastupdate,
    rulenum, priority, filtername)
    values
    (:new.ids, :new.ip_address, :new.center,
    :new.detect_date, :new.port, :new.filter,
    vcharBuf(0)||vcharBuf(1)||vcharBuf(2)||vcharBuf(3)||vcharBuf(4)||vcharBuf(5)||vcharBuf(6)||vcharBuf(7)||vcharBuf(8),
    :new.eventid, :new.lastupdate,
    :new.rulenum, :new.priority, :new.filtername);
    ELSIF vintCntr = 9 THEN
    insert into event_data@ncarsdb2
    (ids, ip_address, center,
    detect_date, port, filter,
    rawdata, eventid, lastupdate,
    rulenum, priority, filtername)
    values
    (:new.ids, :new.ip_address, :new.center,
    :new.detect_date, :new.port, :new.filter,
    vcharBuf(0)||vcharBuf(1)||vcharBuf(2)||vcharBuf(3)||vcharBuf(4)||vcharBuf(5)||vcharBuf(6)||vcharBuf(7)||vcharBuf(8)||vcharBuf(9),
    :new.eventid, :new.lastupdate,
    :new.rulenum, :new.priority, :new.filtername);
    ELSIF vintCntr = 10 THEN
    insert into event_data@ncarsdb2
    (ids, ip_address, center,
    detect_date, port, filter,
    rawdata, eventid, lastupdate,
    rulenum, priority, filtername)
    values
    (:new.ids, :new.ip_address, :new.center,
    :new.detect_date, :new.port, :new.filter,
    vcharBuf(0)||vcharBuf(1)||vcharBuf(2)||vcharBuf(3)||vcharBuf(4)||vcharBuf(5)||vcharBuf(6)||vcharBuf(7)||vcharBuf(8)||vcharBuf(9)||vcharBuf(10),
    :new.eventid, :new.lastupdate,
    :new.rulenum, :new.priority, :new.filtername);
    ELSIF vintCntr = 11 THEN
    insert into event_data@ncarsdb2
    (ids, ip_address, center,
    detect_date, port, filter,
    rawdata, eventid, lastupdate,
    rulenum, priority, filtername)
    values
    (:new.ids, :new.ip_address, :new.center,
    :new.detect_date, :new.port, :new.filter,
    vcharBuf(0)||vcharBuf(1)||vcharBuf(2)||vcharBuf(3)||vcharBuf(4)||vcharBuf(5)||vcharBuf(6)||vcharBuf(7)||vcharBuf(8)||vcharBuf(9)||vcharBuf(10)||vcharBuf(11),
    :new.eventid, :new.lastupdate,
    :new.rulenum, :new.priority, :new.filtername);
    ELSIF vintCntr = 12 THEN
    insert into event_data@ncarsdb2
    (ids, ip_address, center,
    detect_date, port, filter,
    rawdata, eventid, lastupdate,
    rulenum, priority, filtername)
    values
    (:new.ids, :new.ip_address, :new.center,
    :new.detect_date, :new.port, :new.filter,
    vcharBuf(0)||vcharBuf(1)||vcharBuf(2)||vcharBuf(3)||vcharBuf(4)||vcharBuf(5)||vcharBuf(6)||vcharBuf(7)||vcharBuf(8)||vcharBuf(9)||vcharBuf(10)||vcharBuf(11)||vcharBuf(12),
    :new.eventid, :new.lastupdate,
    :new.rulenum, :new.priority, :new.filtername);
    ELSIF vintCntr = 13 THEN
    insert into event_data@ncarsdb2
    (ids, ip_address, center,
    detect_date, port, filter,
    rawdata, eventid, lastupdate,
    rulenum, priority, filtername)
    values
    (:new.ids, :new.ip_address, :new.center,
    :new.detect_date, :new.port, :new.filter,
    vcharBuf(0)||vcharBuf(1)||vcharBuf(2)||vcharBuf(3)||vcharBuf(4)||vcharBuf(5)||vcharBuf(6)||vcharBuf(7)||vcharBuf(8)||vcharBuf(9)||vcharBuf(10)||vcharBuf(11)||vcharBuf(12)||vcharBuf(13),
    :new.eventid, :new.lastupdate,
    :new.rulenum, :new.priority, :new.filtername);
    ELSIF vintCntr = 14 THEN
    insert into event_data@ncarsdb2
    (ids, ip_address, center,
    detect_date, port, filter,
    rawdata, eventid, lastupdate,
    rulenum, priority, filtername)
    values
    (:new.ids, :new.ip_address, :new.center,
    :new.detect_date, :new.port, :new.filter,
    vcharBuf(0)||vcharBuf(1)||vcharBuf(2)||vcharBuf(3)||vcharBuf(4)||vcharBuf(5)||vcharBuf(6)||vcharBuf(7)||vcharBuf(8)||vcharBuf(9)||vcharBuf(10)||vcharBuf(11)||vcharBuf(12)||vcharBuf(13)||vcharBuf(14),
    :new.eventid, :new.lastupdate,
    :new.rulenum, :new.priority, :new.filtername);
    ELSIF vintCntr = 15 THEN
    insert into event_data@ncarsdb2
    (ids, ip_address, center,
    detect_date, port, filter,
    rawdata, eventid, lastupdate,
    rulenum, priority, filtername)
    values
    (:new.ids, :new.ip_address, :new.center,
    :new.detect_date, :new.port, :new.filter,
    vcharBuf(0)||vcharBuf(1)||vcharBuf(2)||vcharBuf(3)||vcharBuf(4)||vcharBuf(5)||vcharBuf(6)||vcharBuf(7)||vcharBuf(8)||vcharBuf(9)||vcharBuf(10)||vcharBuf(11)||vcharBuf(12)||vcharBuf(13)||vcharBuf(14)||vcharBuf(15),
    :new.eventid, :new.lastupdate,
    :new.rulenum, :new.priority, :new.filtername);
    ELSIF vintCntr = 16 THEN
    insert into event_data@ncarsdb2
    (ids, ip_address, center,
    detect_date, port, filter,
    rawdata, eventid, lastupdate,
    rulenum, priority, filtername)
    values
    (:new.ids, :new.ip_address, :new.center,
    :new.detect_date, :new.port, :new.filter,
    vcharBuf(0)||vcharBuf(1)||vcharBuf(2)||vcharBuf(3)||vcharBuf(4)||vcharBuf(5)||vcharBuf(6)||vcharBuf(7)||vcharBuf(8)||vcharBuf(9)||vcharBuf(10)||vcharBuf(11)||vcharBuf(12)||vcharBuf(13)||vcharBuf(14)||vcharBuf(15)||vcharBuf(16),
    :new.eventid, :new.lastupdate,
    :new.rulenum, :new.priority, :new.filtername);
    ELSIF vintCntr = 17 THEN
    insert into event_data@ncarsdb2
    (ids, ip_address, center,
    detect_date, port, filter,
    rawdata, eventid, lastupdate,
    rulenum, priority, filtername)
    values
    (:new.ids, :new.ip_address, :new.center,
    :new.detect_date, :new.port, :new.filter,
    vcharBuf(0)||vcharBuf(1)||vcharBuf(2)||vcharBuf(3)||vcharBuf(4)||vcharBuf(5)||vcharBuf(6)||vcharBuf(7)||vcharBuf(8)||vcharBuf(9)||vcharBuf(10)||vcharBuf(11)||vcharBuf(12)||vcharBuf(13)||vcharBuf(14)||vcharBuf(15)||vcharBuf(16)||vcharBuf(17),
    :new.eventid, :new.lastupdate,
    :new.rulenum, :new.priority, :new.filtername);
    ELSIF vintCntr = 18 THEN
    insert into event_data@ncarsdb2
    (ids, ip_address, center,
    detect_date, port, filter,
    rawdata, eventid, lastupdate,
    rulenum, priority, filtername)
    values
    (:new.ids, :new.ip_address, :new.center,
    :new.detect_date, :new.port, :new.filter,
    vcharBuf(0)||vcharBuf(1)||vcharBuf(2)||vcharBuf(3)||vcharBuf(4)||vcharBuf(5)||vcharBuf(6)||vcharBuf(7)||vcharBuf(8)||vcharBuf(9)||vcharBuf(10)||vcharBuf(11)||vcharBuf(12)||vcharBuf(13)||vcharBuf(14)||vcharBuf(15)||vcharBuf(16)||vcharBuf(17)||vcharBuf(18),
    :new.eventid, :new.lastupdate,
    :new.rulenum, :new.priority, :new.filtername);
    ELSIF vintCntr = 19 THEN
    insert into event_data@ncarsdb2
    (ids, ip_address, center,
    detect_date, port, filter,
    rawdata, eventid, lastupdate,
    rulenum, priority, filtername)
    values
    (:new.ids, :new.ip_address, :new.center,
    :new.detect_date, :new.port, :new.filter,
    vcharBuf(0)||vcharBuf(1)||vcharBuf(2)||vcharBuf(3)||vcharBuf(4)||vcharBuf(5)||vcharBuf(6)||vcharBuf(7)||vcharBuf(8)||vcharBuf(9)||vcharBuf(10)||vcharBuf(11)||vcharBuf(12)||vcharBuf(13)||vcharBuf(14)||vcharBuf(15)||vcharBuf(16)||vcharBuf(17)||vcharBuf(18)||vcharBuf(19),
    :new.eventid, :new.lastupdate,
    :new.rulenum, :new.priority, :new.filtername);
    ELSIF vintCntr = 20 THEN
    insert into event_data@ncarsdb2
    (ids, ip_address, center,
    detect_date, port, filter,
    rawdata, eventid, lastupdate,
    rulenum, priority, filtername)
    values
    (:new.ids, :new.ip_address, :new.center,
    :new.detect_date, :new.port, :new.filter,
    vcharBuf(0)||vcharBuf(1)||vcharBuf(2)||vcharBuf(3)||vcharBuf(4)||vcharBuf(5)||vcharBuf(6)||vcharBuf(7)||vcharBuf(8)||vcharBuf(9)||vcharBuf(10)||vcharBuf(11)||vcharBuf(12)||vcharBuf(13)||vcharBuf(14)||vcharBuf(15)||vcharBuf(16)||vcharBuf(17)||vcharBuf(18)||vcharBuf(19)||vcharBuf(20),
    :new.eventid, :new.lastupdate,
    :new.rulenum, :new.priority, :new.filtername);
    ELSIF vintCntr = 21 THEN
    insert into event_data@ncarsdb2
    (ids, ip_address, center,
    detect_date, port, filter,
    rawdata, eventid, lastupdate,
    rulenum, priority, filtername)
    values
    (:new.ids, :new.ip_address, :new.center,
    :new.detect_date, :new.port, :new.filter,
    vcharBuf(0)||vcharBuf(1)||vcharBuf(2)||vcharBuf(3)||vcharBuf(4)||vcharBuf(5)||vcharBuf(6)||vcharBuf(7)||vcharBuf(8)||vcharBuf(9)||vcharBuf(10)||vcharBuf(11)||vcharBuf(12)||vcharBuf(13)||vcharBuf(14)||vcharBuf(15)||vcharBuf(16)||vcharBuf(17)||vcharBuf(18)||vcharBuf(19)||vcharBuf(20)||vcharBuf(21),
    :new.eventid, :new.lastupdate,
    :new.rulenum, :new.priority, :new.filtername);
    ELSIF vintCntr = 22 THEN
    insert into event_data@ncarsdb2
    (ids, ip_address, center,
    detect_date, port, filter,
    rawdata, eventid, lastupdate,
    rulenum, priority, filtername)
    values
    (:new.ids, :new.ip_address, :new.center,
    :new.detect_date, :new.port, :new.filter,
    vcharBuf(0)||vcharBuf(1)||vcharBuf(2)||vcharBuf(3)||vcharBuf(4)||vcharBuf(5)||vcharBuf(6)||vcharBuf(7)||vcharBuf(8)||vcharBuf(9)||vcharBuf(10)||vcharBuf(11)||vcharBuf(12)||vcharBuf(13)||vcharBuf(14)||vcharBuf(15)||vcharBuf(16)||vcharBuf(17)||vcharBuf(18)||vcharBuf(19)||vcharBuf(20)||vcharBuf(21)||vcharBuf(22),
    :new.eventid, :new.lastupdate,
    :new.rulenum, :new.priority, :new.filtername);
    ELSIF vintCntr = 23 THEN
    insert into event_data@ncarsdb2
    (ids, ip_address, center,
    detect_date, port, filter,
    rawdata, eventid, lastupdate,
    rulenum, priority, filtername)
    values
    (:new.ids, :new.ip_address, :new.center,
    :new.detect_date, :new.port, :new.filter,
    vcharBuf(0)||vcharBuf(1)||vcharBuf(2)||vcharBuf(3)||vcharBuf(4)||vcharBuf(5)||vcharBuf(6)||vcharBuf(7)||vcharBuf(8)||vcharBuf(9)||vcharBuf(10)||vcharBuf(11)||vcharBuf(12)||vcharBuf(13)||vcharBuf(14)||vcharBuf(15)||vcharBuf(16)||vcharBuf(17)||vcharBuf(18)||vcharBuf(19)||vcharBuf(20)||vcharBuf(21)||vcharBuf(22)||vcharBuf(23),
    :new.eventid, :new.lastupdate,
    :new.rulenum, :new.priority, :new.filtername);
    ELSIF vintCntr = 24 THEN
    insert into event_data@ncarsdb2
    (ids, ip_address, center,
    detect_date, port, filter,
    rawdata, eventid, lastupdate,
    rulenum, priority, filtername)
    values
    (:new.ids, :new.ip_address, :new.center,
    :new.detect_date, :new.port, :new.filter,
    vcharBuf(0)||vcharBuf(1)||vcharBuf(2)||vcharBuf(3)||vcharBuf(4)||vcharBuf(5)||vcharBuf(6)||vcharBuf(7)||vcharBuf(8)||vcharBuf(9)||vcharBuf(10)||vcharBuf(11)||vcharBuf(12)||vcharBuf(13)||vcharBuf(14)||vcharBuf(15)||vcharBuf(16)||vcharBuf(17)||vcharBuf(18)||vcharBuf(19)||vcharBuf(20)||vcharBuf(21)||vcharBuf(22)||vcharBuf(23)||vcharBuf(24),
    :new.eventid, :new.lastupdate,
    :new.rulenum, :new.priority, :new.filtername);
    ELSIF vintCntr = 25 THEN
    insert into event_data@ncarsdb2
    (ids, ip_address, center,
    detect_date, port, filter,
    rawdata, eventid, lastupdate,
    rulenum, priority, filtername)
    values
    (:new.ids, :new.ip_address, :new.center,
    :new.detect_date, :new.port, :new.filter,
    vcharBuf(0)||vcharBuf(1)||vcharBuf(2)||vcharBuf(3)||vcharBuf(4)||vcharBuf(5)||vcharBuf(6)||vcharBuf(7)||vcharBuf(8)||vcharBuf(9)||vcharBuf(10)||vcharBuf(11)||vcharBuf(12)||vcharBuf(13)||vcharBuf(14)||vcharBuf(15)||vcharBuf(16)||vcharBuf(17)||vcharBuf(18)||vcharBuf(19)||vcharBuf(20)||vcharBuf(21)||vcharBuf(22)||vcharBuf(23)||vcharBuf(24)||vcharBuf(25),
    :new.eventid, :new.lastupdate,
    :new.rulenum, :new.priority, :new.filtername);
    ELSIF vintCntr = 26 THEN
    insert into event_data@ncarsdb2
    (ids, ip_address, center,
    detect_date, port, filter,
    rawdata, eventid, lastupdate,
    rulenum, priority, filtername)
    values
    (:new.ids, :new.ip_address, :new.center,
    :new.detect_date, :new.port, :new.filter,
    vcharBuf(0)||vcharBuf(1)||vcharBuf(2)||vcharBuf(3)||vcharBuf(4)||vcharBuf(5)||vcharBuf(6)||vcharBuf(7)||vcharBuf(8)||vcharBuf(9)||vcharBuf(10)||vcharBuf(11)||vcharBuf(12)||vcharBuf(13)||vcharBuf(14)||vcharBuf(15)||vcharBuf(16)||vcharBuf(17)||vcharBuf(18)||vcharBuf(19)||vcharBuf(20)||vcharBuf(21)||vcharBuf(22)||vcharBuf(23)||vcharBuf(24)||vcharBuf(25)||vcharBuf(26),
    :new.eventid, :new.lastupdate,
    :new.rulenum, :new.priority, :new.filtername);
    ELSIF vintCntr = 27 THEN
    insert into event_data@ncarsdb2
    (ids, ip_address, center,
    detect_date, port, filter,
    rawdata, eventid, lastupdate,
    rulenum, priority, filtername)
    values
    (:new.ids, :new.ip_address, :new.center,
    :new.detect_date, :new.port, :new.filter,
    vcharBuf(0)||vcharBuf(1)||vcharBuf(2)||vcharBuf(3)||vcharBuf(4)||vcharBuf(5)||vcharBuf(6)||vcharBuf(7)||vcharBuf(8)||vcharBuf(9)||vcharBuf(10)||vcharBuf(11)||vcharBuf(12)||vcharBuf(13)||vcharBuf(14)||vcharBuf(15)||vcharBuf(16)||vcharBuf(17)||vcharBuf(18)||vcharBuf(19)||vcharBuf(20)||vcharBuf(21)||vcharBuf(22)||vcharBuf(23)||vcharBuf(24)||vcharBuf(25)||vcharBuf(26)||vcharBuf(27),
    :new.eventid, :new.lastupdate,
    :new.rulenum, :new.priority, :new.filtername);
    ELSIF vintCntr = 28 THEN
    insert into event_data@ncarsdb2
    (ids, ip_address, center,
    detect_date, port, filter,
    rawdata, eventid, lastupdate,
    rulenum, priority, filtername)
    values
    (:new.ids, :new.ip_address, :new.center,
    :new.detect_date, :new.port, :new.filter,
    vcharBuf(0)||vcharBuf(1)||vcharBuf(2)||vcharBuf(3)||vcharBuf(4)||vcharBuf(5)||vcharBuf(6)||vcharBuf(7)||vcharBuf(8)||vcharBuf(9)||vcharBuf(10)||vcharBuf(11)||vcharBuf(12)||vcharBuf(13)||vcharBuf(14)||vcharBuf(15)||vcharBuf(16)||vcharBuf(17)||vcharBuf(18)||vcharBuf(19)||vcharBuf(20)||vcharBuf(21)||vcharBuf(22)||vcharBuf(23)||vcharBuf(24)||vcharBuf(25)||vcharBuf(26)||vcharBuf(27)||vcharBuf(28),
    :new.eventid, :new.lastupdate,
    :new.rulenum, :new.priority, :new.filtername);
    ELSIF vintCntr = 29 THEN
    insert into event_data@ncarsdb2
    (ids, ip_address, center,
    detect_date, port, filter,
    rawdata, eventid, lastupdate,
    rulenum, priority, filtername)
    values
    (:new.ids, :new.ip_address, :new.center,
    :new.detect_date, :new.port, :new.filter,
    vcharBuf(0)||vcharBuf(1)||vcharBuf(2)||vcharBuf(3)||vcharBuf(4)||vcharBuf(5)||vcharBuf(6)||vcharBuf(7)||vcharBuf(8)||vcharBuf(9)||vcharBuf(10)||vcharBuf(11)||vcharBuf(12)||vcharBuf(13)||vcharBuf(14)||vcharBuf(15)||vcharBuf(16)||vcharBuf(17)||vcharBuf(18)||vcharBuf(19)||vcharBuf(20)||vcharBuf(21)||vcharBuf(22)||vcharBuf(23)||vcharBuf(24)||vcharBuf(25)||vcharBuf(26)||vcharBuf(27)||vcharBuf(28)||vcharBuf(29),
    :new.eventid, :new.lastupdate,
    :new.rulenum, :new.priority, :new.filtername);
    ELSIF vintCntr = 30 THEN
    insert into event_data@ncarsdb2
    (ids, ip_address, center,
    detect_date, port, filter,
    rawdata, eventid, lastupdate,
    rulenum, priority, filtername)
    values
    (:new.ids, :new.ip_address, :new.center,
    :new.detect_date, :new.port, :new.filter,
    vcharBuf(0)||vcharBuf(1)||vcharBuf(2)||vcharBuf(3)||vcharBuf(4)||vcharBuf(5)||vcharBuf(6)||vcharBuf(7)||vcharBuf(8)||vcharBuf(9)||vcharBuf(10)||vcharBuf(11)||vcharBuf(12)||vcharBuf(13)||vcharBuf(14)||vcharBuf(15)||vcharBuf(16)||vcharBuf(17)||vcharBuf(18)||vcharBuf(19)||vcharBuf(20)||vcharBuf(21)||vcharBuf(22)||vcharBuf(23)||vcharBuf(24)||vcharBuf(25)||vcharBuf(26)||vcharBuf(27)||vcharBuf(28)||vcharBuf(29)||vcharBuf(30),
    :new.eventid, :new.lastupdate,
    :new.rulenum, :new.priority, :new.filtername);
    ELSIF vintCntr = 31 THEN
    insert into event_data@ncarsdb2
    (ids, ip_address, center,
    detect_date, port, filter,
    rawdata, eventid, lastupdate,
    rulenum, priority, filtername)
    values
    (:new.ids, :new.ip_address, :new.center,
    :new.detect_date, :new.port, :new.filter,
    vcharBuf(0)||vcharBuf(1)||vcharBuf(2)||vcharBuf(3)||vcharBuf(4)||vcharBuf(5)||vcharBuf(6)||vcharBuf(7)||vcharBuf(8)||vcharBuf(9)||vcharBuf(10)||vcharBuf(11)||vcharBuf(12)||vcharBuf(13)||vcharBuf(14)||vcharBuf(15)||vcharBuf(16)||vcharBuf(17)||vcharBuf(18)||vcharBuf(19)||vcharBuf(20)||vcharBuf(21)||vcharBuf(22)||vcharBuf(23)||vcharBuf(24)||vcharBuf(25)||vcharBuf(26)||vcharBuf(27)||vcharBuf(28)||vcharBuf(29)||vcharBuf(30)||vcharBuf(31),
    :new.eventid, :new.lastupdate,
    :new.rulenum, :new.priority, :new.filtername);
    ELSIF vintCntr = 32 THEN
    insert into event_data@ncarsdb2
    (ids, ip_address, center,
    detect_date, port, filter,
    rawdata, eventid, lastupdate,
    rulenum, priority, filtername)
    values
    (:new.ids, :new.ip_address, :new.center,
    :new.detect_date, :new.port, :new.filter,
    vcharBuf(0)||vcharBuf(1)||vcharBuf(2)||vcharBuf(3)||vcharBuf(4)||vcharBuf(5)||vcharBuf(6)||vcharBuf(7)||vcharBuf(8)||vcharBuf(9)||vcharBuf(10)||vcharBuf(11)||vcharBuf(12)||vcharBuf(13)||vcharBuf(14)||vcharBuf(15)||vcharBuf(16)||vcharBuf(17)||vcharBuf(18)||vcharBuf(19)||vcharBuf(20)||vcharBuf(21)||vcharBuf(22)||vcharBuf(23)||vcharBuf(24)||vcharBuf(25)||vcharBuf(26)||vcharBuf(27)||vcharBuf(28)||vcharBuf(29)||vcharBuf(30)||vcharBuf(31)||vcharBuf(32),
    :new.eventid, :new.lastupdate,
    :new.rulenum, :new.priority, :new.filtername);
    ELSE
    insert into ncars.trigger_events
    (dt, ip, id, ival1, ival2, cval1, cval2)
    values
    (sysdate, :new.ip_address, :new.eventid, vintCntr,
    vintTotallength, 'COPYUP', 'EVENT_DATA');
    END IF;
    EXCEPTION
    when others then
    vnumError := SQLCODE;
    vcharErrstr := SUBSTR(SQLERRM, 1, 200);
    insert into ncars.trigger_events
    (dt, ip, id, ival1, ival2, cval1, cval2)
    values
    (sysdate, :new.ip_address, :new.eventid, vintCntr,
    vnumError, 'COPYUP', vcharErrstr);
    END COPYUP;

    I aim to please any and all that wish to help. This is very similar to my original trigger. This trigger is constrained by the 32500 size.
    CREATE OR REPLACE TRIGGER COPYUP
    INSERT ON EVENT_DATA FOR EACH ROW
    DECLARE
    vcharBuf varchar2(32500);
    vintTotallength integer := 1;
    vclobVal clob;
    BEGIN
    select :new.rawdata into vclobVal from dual;
    vintTotallength := dbms_lob.getlength(vclobVal);
    dbms_lob.read(vclobVal, vintTotallength , 1, vcharBuf);
    insert into event_data@ncarsdb2
    (ids, ip_address, center,
    detect_date, port, filter,
    rawdata, eventid, lastupdate,
    rulenum, priority, filtername)
    values
    (:new.ids, :new.ip_address, :new.center,
    :new.detect_date, :new.port, :new.filter,
    vcharBuf,
    :new.eventid, :new.lastupdate,
    :new.rulenum, :new.priority, :new.filtername);
    END COPYUP;

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

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

  • Error while trying to insert data on a database through a mediator

    I have build a simple project on 11g TP$, which consists of a mediator, a file adapter, that reads an xml file and a DB adapter that inserts data on a database.
    The mediator connects the file adapter to the DB adapter and through a routing rule it inserts data on a table of the database.
    When I try to run this project the input file is consumed by the file adapter, but after that I get the following error
    SEVERE: Part {body} return null from the message :in
    Dec 5, 2008 2:24:55 PM oracle.tip.mediator.service.transformation.XSLTransformer getPartDocument
    SEVERE: payload map source message :{opaque=oracle.xml.parser.v2.XMLElement@19b0076}
    Dec 5, 2008 2:24:55 PM oracle.tip.mediator.service.transformation.MediatorTransformationHandler transform
    SEVERE: Transformation failed
    oracle.tip.mediator.infra.exception.MediatorException: Error occured while transforming payload!
    Please review the XSL or source payload.Contact Oracle Support if error not fixable
    at oracle.tip.mediator.service.transformation.XSLTransformer.getPartDocument(XSLTransformer.java:191)
    at oracle.tip.mediator.service.transformation.XSLTransformer.transform(XSLTransformer.java:102)
    at oracle.tip.mediator.service.transformation.MediatorTransformationHandler.transform(MediatorTransformationHandler.java:103)
    at oracle.tip.mediator.service.transformation.MediatorTransformationHandler.transform(MediatorTransformationHandler.java:196)
    at oracle.tip.mediator.service.DataActionHandler.getNextPayload(DataActionHandler.java:145)
    at oracle.tip.mediator.service.BaseActionHandler.requestProcess(BaseActionHandler.java:74)
    at oracle.tip.mediator.service.BaseActionHandler.requestProcess(BaseActionHandler.java:53)
    at oracle.tip.mediator.service.OneWayActionHandler.oneWayRequestProcess(OneWayActionHandler.java:67)
    at oracle.tip.mediator.service.OneWayActionHandler.process(OneWayActionHandler.java:34)
    at oracle.tip.mediator.service.ActionProcessor.onMessage(ActionProcessor.java:61)
    at oracle.tip.mediator.dispatch.MessageDispatcher.executeCase(MessageDispatcher.java:103)
    at oracle.tip.mediator.dispatch.InitialMessageDispatcher.processCase(InitialMessageDispatcher.java:465)
    at oracle.tip.mediator.dispatch.InitialMessageDispatcher.processCases(InitialMessageDispatcher.java:361)
    at oracle.tip.mediator.dispatch.InitialMessageDispatcher.processCases(InitialMessageDispatcher.java:254)
    at oracle.tip.mediator.dispatch.InitialMessageDispatcher.dispatch(InitialMessageDispatcher.java:149)
    at oracle.tip.mediator.serviceEngine.MediatorServiceEngine.process(MediatorServiceEngine.java:533)
    at oracle.tip.mediator.serviceEngine.MediatorServiceEngine.post(MediatorServiceEngine.java:634)
    at oracle.integration.platform.blocks.mesh.AsynchronousMessageHandler.doPost(AsynchronousMessageHandler.java:138)
    at oracle.integration.platform.blocks.mesh.MessageRouter.post(MessageRouter.java:152)
    at oracle.integration.platform.blocks.mesh.MeshImpl.post(MeshImpl.java:159)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:296)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:177)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:144)
    at oracle.integration.platform.metrics.PhaseEventAspect.invoke(PhaseEventAspect.java:59)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:166)
    at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
    at $Proxy70.post(Unknown Source)
    at oracle.integration.platform.blocks.adapter.fw.jca.mdb.AdapterServiceMDB.onMessage(AdapterServiceMDB.java:574)
    at oracle.integration.platform.blocks.adapter.fw.jca.messageinflow.MessageEndpointImpl.onMessage(MessageEndpointImpl.java:295)
    at oracle.tip.adapter.file.inbound.ProcessWork.publishMessage(ProcessWork.java:2127)
    at oracle.tip.adapter.file.inbound.ProcessWork.doTranslation(ProcessWork.java:1719)
    at oracle.tip.adapter.file.inbound.ProcessWork.translateAndPublish(ProcessWork.java:677)
    at oracle.tip.adapter.file.inbound.ProcessWork.run(ProcessWork.java:320)
    at oracle.integration.platform.blocks.adapter.fw.jca.work.WorkerJob.go(WorkerJob.java:51)
    at oracle.integration.platform.blocks.adapter.fw.common.ThreadPool.run(ThreadPool.java:283)
    at java.lang.Thread.run(Thread.java:595)
    Dec 5, 2008 2:24:55 PM oracle.tip.mediator.serviceEngine.MediatorServiceEngine process
    SEVERE: Updating fault processing DMS metrics
    Dec 5, 2008 2:24:55 PM oracle.tip.mediator.serviceEngine.MediatorServiceEngine process
    SEVERE: Got an exception: Error occured while transforming payload!
    Please review the XSL or source payload.Contact Oracle Support if error not fixable
    oracle.tip.mediator.infra.exception.MediatorException: Error occured while transforming payload!
    Please review the XSL or source payload.Contact Oracle Support if error not fixable
    at oracle.tip.mediator.service.transformation.XSLTransformer.getPartDocument(XSLTransformer.java:191)
    at oracle.tip.mediator.service.transformation.XSLTransformer.transform(XSLTransformer.java:102)
    at oracle.tip.mediator.service.transformation.MediatorTransformationHandler.transform(MediatorTransformationHandler.java:103)
    at oracle.tip.mediator.service.transformation.MediatorTransformationHandler.transform(MediatorTransformationHandler.java:196)
    at oracle.tip.mediator.service.DataActionHandler.getNextPayload(DataActionHandler.java:145)
    at oracle.tip.mediator.service.BaseActionHandler.requestProcess(BaseActionHandler.java:74)
    at oracle.tip.mediator.service.BaseActionHandler.requestProcess(BaseActionHandler.java:53)
    at oracle.tip.mediator.service.OneWayActionHandler.oneWayRequestProcess(OneWayActionHandler.java:67)
    at oracle.tip.mediator.service.OneWayActionHandler.process(OneWayActionHandler.java:34)
    at oracle.tip.mediator.service.ActionProcessor.onMessage(ActionProcessor.java:61)
    at oracle.tip.mediator.dispatch.MessageDispatcher.executeCase(MessageDispatcher.java:103)
    at oracle.tip.mediator.dispatch.InitialMessageDispatcher.processCase(InitialMessageDispatcher.java:465)
    at oracle.tip.mediator.dispatch.InitialMessageDispatcher.processCases(InitialMessageDispatcher.java:361)
    at oracle.tip.mediator.dispatch.InitialMessageDispatcher.processCases(InitialMessageDispatcher.java:254)
    at oracle.tip.mediator.dispatch.InitialMessageDispatcher.dispatch(InitialMessageDispatcher.java:149)
    at oracle.tip.mediator.serviceEngine.MediatorServiceEngine.process(MediatorServiceEngine.java:533)
    at oracle.tip.mediator.serviceEngine.MediatorServiceEngine.post(MediatorServiceEngine.java:634)
    at oracle.integration.platform.blocks.mesh.AsynchronousMessageHandler.doPost(AsynchronousMessageHandler.java:138)
    at oracle.integration.platform.blocks.mesh.MessageRouter.post(MessageRouter.java:152)
    at oracle.integration.platform.blocks.mesh.MeshImpl.post(MeshImpl.java:159)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:296)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:177)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:144)
    at oracle.integration.platform.metrics.PhaseEventAspect.invoke(PhaseEventAspect.java:59)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:166)
    at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
    at $Proxy70.post(Unknown Source)
    at oracle.integration.platform.blocks.adapter.fw.jca.mdb.AdapterServiceMDB.onMessage(AdapterServiceMDB.java:574)
    at oracle.integration.platform.blocks.adapter.fw.jca.messageinflow.MessageEndpointImpl.onMessage(MessageEndpointImpl.java:295)
    at oracle.tip.adapter.file.inbound.ProcessWork.publishMessage(ProcessWork.java:2127)
    at oracle.tip.adapter.file.inbound.ProcessWork.doTranslation(ProcessWork.java:1719)
    at oracle.tip.adapter.file.inbound.ProcessWork.translateAndPublish(ProcessWork.java:677)
    at oracle.tip.adapter.file.inbound.ProcessWork.run(ProcessWork.java:320)
    at oracle.integration.platform.blocks.adapter.fw.jca.work.WorkerJob.go(WorkerJob.java:51)
    at oracle.integration.platform.blocks.adapter.fw.common.ThreadPool.run(ThreadPool.java:283)
    at java.lang.Thread.run(Thread.java:595)
    Dec 5, 2008 2:24:55 PM oracle.integration.platform.blocks.adapter.fw.log.LogManagerImpl log
    SEVERE: JCABinding=> Read ReadAdapter Service Read was unable to perform delivery of inbound message to the composite due to: oracle.tip.mediator.infra.exception.MediatorException: Error occured while transforming payload!
    Please review the XSL or source payload.Contact Oracle Support if error not fixable
    Dec 5, 2008 2:24:55 PM oracle.integration.platform.blocks.adapter.fw.log.LogManagerImpl log
    SEVERE: JCABinding=> Read
    oracle.fabric.common.FabricInvocationException: oracle.tip.mediator.infra.exception.MediatorException: Error occured while transforming payload!
    Please review the XSL or source payload.Contact Oracle Support if error not fixable
    at oracle.tip.mediator.serviceEngine.MediatorServiceEngine.process(MediatorServiceEngine.java:599)
    at oracle.tip.mediator.serviceEngine.MediatorServiceEngine.post(MediatorServiceEngine.java:634)
    at oracle.integration.platform.blocks.mesh.AsynchronousMessageHandler.doPost(AsynchronousMessageHandler.java:138)
    at oracle.integration.platform.blocks.mesh.MessageRouter.post(MessageRouter.java:152)
    at oracle.integration.platform.blocks.mesh.MeshImpl.post(MeshImpl.java:159)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:296)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:177)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:144)
    at oracle.integration.platform.metrics.PhaseEventAspect.invoke(PhaseEventAspect.java:59)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:166)
    at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
    at $Proxy70.post(Unknown Source)
    at oracle.integration.platform.blocks.adapter.fw.jca.mdb.AdapterServiceMDB.onMessage(AdapterServiceMDB.java:574)
    at oracle.integration.platform.blocks.adapter.fw.jca.messageinflow.MessageEndpointImpl.onMessage(MessageEndpointImpl.java:295)
    at oracle.tip.adapter.file.inbound.ProcessWork.publishMessage(ProcessWork.java:2127)
    at oracle.tip.adapter.file.inbound.ProcessWork.doTranslation(ProcessWork.java:1719)
    at oracle.tip.adapter.file.inbound.ProcessWork.translateAndPublish(ProcessWork.java:677)
    at oracle.tip.adapter.file.inbound.ProcessWork.run(ProcessWork.java:320)
    at oracle.integration.platform.blocks.adapter.fw.jca.work.WorkerJob.go(WorkerJob.java:51)
    at oracle.integration.platform.blocks.adapter.fw.common.ThreadPool.run(ThreadPool.java:283)
    at java.lang.Thread.run(Thread.java:595)
    Caused by: oracle.tip.mediator.infra.exception.MediatorException: Error occured while transforming payload!
    Please review the XSL or source payload.Contact Oracle Support if error not fixable
    at oracle.tip.mediator.service.transformation.XSLTransformer.getPartDocument(XSLTransformer.java:191)
    at oracle.tip.mediator.service.transformation.XSLTransformer.transform(XSLTransformer.java:102)
    at oracle.tip.mediator.service.transformation.MediatorTransformationHandler.transform(MediatorTransformationHandler.java:103)
    at oracle.tip.mediator.service.transformation.MediatorTransformationHandler.transform(MediatorTransformationHandler.java:196)
    at oracle.tip.mediator.service.DataActionHandler.getNextPayload(DataActionHandler.java:145)
    at oracle.tip.mediator.service.BaseActionHandler.requestProcess(BaseActionHandler.java:74)
    at oracle.tip.mediator.service.BaseActionHandler.requestProcess(BaseActionHandler.java:53)
    at oracle.tip.mediator.service.OneWayActionHandler.oneWayRequestProcess(OneWayActionHandler.java:67)
    at oracle.tip.mediator.service.OneWayActionHandler.process(OneWayActionHandler.java:34)
    at oracle.tip.mediator.service.ActionProcessor.onMessage(ActionProcessor.java:61)
    at oracle.tip.mediator.dispatch.MessageDispatcher.executeCase(MessageDispatcher.java:103)
    at oracle.tip.mediator.dispatch.InitialMessageDispatcher.processCase(InitialMessageDispatcher.java:465)
    at oracle.tip.mediator.dispatch.InitialMessageDispatcher.processCases(InitialMessageDispatcher.java:361)
    at oracle.tip.mediator.dispatch.InitialMessageDispatcher.processCases(InitialMessageDispatcher.java:254)
    at oracle.tip.mediator.dispatch.InitialMessageDispatcher.dispatch(InitialMessageDispatcher.java:149)
    at oracle.tip.mediator.serviceEngine.MediatorServiceEngine.process(MediatorServiceEngine.java:533)
    ... 24 more
    Dec 5, 2008 2:24:55 PM oracle.integration.platform.blocks.adapter.fw.log.LogManagerImpl log
    WARNING: JCABinding=> Read ReadonReject: The resource adapter 'File Adapter' requested handling of a malformed inbound message. However, the following Service property has not been defined: 'rejectedMessageHandlers'. Please define it and redeploy the module. Will use the default Rejection Directory file://jca\Read\rejectedMessages for now.
    Dec 5, 2008 2:24:55 PM oracle.integration.platform.blocks.adapter.fw.log.LogManagerImpl log
    WARNING: JCABinding=> Read ReadonReject: Sending invalid inbound message to Exception Handler:
    Dec 5, 2008 2:24:55 PM oracle.tip.mediator.common.error.ErrorMessageEnqueuer$EnqueuerThread run
    SEVERE: Failed to enqueue error message
    javax.jms.TransactionInProgressException: Cannot call commit on a XA capable JMS session.
    at oracle.j2ee.ra.jms.generic.RAUtils.make(RAUtils.java:595)
    at oracle.j2ee.ra.jms.generic.RAUtils.toTransactionInProgressException(RAUtils.java:846)
    at oracle.j2ee.ra.jms.generic.RAUtils.toTransactionInProgressException(RAUtils.java:840)
    at oracle.j2ee.ra.jms.generic.SessionWrapper.commit(SessionWrapper.java:197)
    at oracle.tip.mediator.common.error.ErrorMessageEnqueuer$EnqueuerThread.run(ErrorMessageEnqueuer.java:187)
    at java.lang.Thread.run(Thread.java:595)
    I have checked the .xsd file and my xml several times and it seems that they are correct. Moreover, the .xsl file is also correct.
    Does anyone have any idea of what may produce this problem?
    Thanks

    I was finally able to get my project working. Heidi - You were right, there was a problem with the XSL generated by the XSL map editor.
    I am trying to locate if this issue has already been reported, but I am highlighting it here, in case someone else faces the same.
    The XSL generated was as follows:
    &lt;xsl:stylesheet version="1.0"
    xmlns:dvm="[http://www.oracle.com/XSL/Transform/java/oracle.tip.dvm.LookupValue]"
    xmlns:bpws="[http://schemas.xmlsoap.org/ws/2003/03/business-process/]"
    xmlns:ns1="[http://xmlns.oracle.com/pcbpel/adapter/db/ReadEmps/Read/DB/]"
    xmlns:plt="[http://schemas.xmlsoap.org/ws/2003/05/partner-link/]"
    xmlns:ns0="[http://www.w3.org/2001/XMLSchema]"
    xmlns:hwf="[http://xmlns.oracle.com/bpel/workflow/xpath]"
    xmlns:xp20="[http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.Xpath20]"
    xmlns:xref="[http://www.oracle.com/XSL/Transform/java/oracle.tip.xref.xpath.XRefXPathFunctions]"
    xmlns:tns="[http://xmlns.oracle.com/pcbpel/adapter/file/ReadEmps/Read/Read/]"
    xmlns:xsl="[http://www.w3.org/1999/XSL/Transform]"
    xmlns:ora="[http://schemas.oracle.com/xpath/extension]"
    xmlns:xsi="[http://www.w3.org/2001/XMLSchema-instance]"
    xmlns:imp1="[www.TargetNameSpace.com/EmpTrack|http://www.targetnamespace.com/EmpTrack]*"*
    xmlns:top="[http://xmlns.oracle.com/pcbpel/adapter/db/top/DB]"
    xmlns:ids="[http://xmlns.oracle.com/bpel/services/IdentityService/xpath]"
    xmlns:orcl="[http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.ExtFunc]"
    xmlns:mhdr="[http://www.oracle.com/XSL/Transform/java/oracle.tip.mediator.service.common.functions.GetRequestHeaderExtnFunction]"
    exclude-result-prefixes="xsl plt ns0 tns imp1 ns1 top dvm bpws hwf xp20 xref ora ids orcl mhdr"&gt;
    &lt;xsl:template match="/"&gt;
    &lt;top:EmployeeTrackingCollection&gt;
    &lt;xsl:for-each select*="/imp1:ROWSET/imp1:ROW*"&gt;
    &lt;top:EmployeeTracking&gt;
    &lt;top:locationId&gt;
    &lt;xsl:value-of select="*imp1:LOCATION_ID*"/&gt;
    &lt;/top:locationId&gt;
    &lt;top:employeeId&gt;
    &lt;xsl:value-of select="*imp1:EMPLOYEE_ID*"/&gt;
    &lt;/top:employeeId&gt;
    &lt;top:employeeX&gt;
    &lt;xsl:value-of select="*imp1:EMPLOYEE_X*"/&gt;
    &lt;/top:employeeX&gt;
    &lt;top:employeeY&gt;
    &lt;xsl:value-of select="*imp1:EMPLOYEE_Y"*/&gt;
    &lt;/top:employeeY&gt;
    &lt;/top:EmployeeTracking&gt;
    &lt;/xsl:for-each&gt;
    &lt;/top:EmployeeTrackingCollection&gt;
    &lt;/xsl:template&gt;
    &lt;/xsl:stylesheet&gt;
    The Xpath included the "imp1:" tag to reference the namespace. I tested this XSL and it didn't work. However, on removing the namespace "imp1:" from the Xpath, the XSL works fine and I am able to insert into the database. "No suitable driver" still appears in the log, but all rows from the XML are inserted into the database.
    Heidi - do you think this is a bug?

  • Inserting blob data into database

    Hello everybody,
    I need insert blob data into database. that data i need to get from form
    can i use request.getParameter(""); for getting that file.
    Plz help how to get data from form to servlet and through callablestatement i need to insert into database.
    regards,
    Anil

    Hi,
    1) first create a form with file element
    first.jsp
    <form action="GetData" enctype="multipart/form-data" method="post">
    <input type="file" name="datafile" size="40">
    <input type="submit" value="Send">
    <input type="reset" name="Reset" value="Cancel">
    </form>
    GetData.java
    // servlet file
    public void doPost(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException
    res.setContentType("text/html");
    PrintWriter out = response.getWriter();
    try {
    System.setProperty( "jdbc.drivers", "com.microsoft.jdbc.sqlserver.SQLServerDriver" );
    Class.forName( "com.microsoft.jdbc.sqlserver.SQLServerDriver" );
    con = DriverManager.getConnection( "jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=JAVATEAM;SelectMethod=cursor;User=sa;Password=urpassword" );
    PreparedStatement pst = con.prepareStatement("insert into uploads(binaryfile) values(?)");
    FileInputStream fis=new FileInputStream(request.getParameter ( "datafile" ) );
    byte[] b= new byte[fis.available()+1];
    fis.read(b);
    pst.setBytes(1,b);
    pst.executeUpdate();
    pst.close();
    con.close();
    catch(SQLException e)
    out.println ( e);
    catch (ClassNotFoundException e)
    out.println( e );
    }Here in doPost(), i create preparedstatement,
    now you to create one procedure for insert
    and by using callable statement you just call that procedure and pass this byte b as arguments,
    now its in your hands
    my idea is over.

  • The ABAP/4 Open SQL array insert results in duplicate database records

    Hi,
    Iam getting following error :
    The ABAP/4 Open SQL array insert results in duplicate database records.
    Error in ABAP application program.
    The current ABAP program "SAPLV60U" had to be terminated because one of the
    statements could not be executed.
    This is probably due to an error in the ABAP program.
    " Information on where terminated
    The termination occurred in the ABAP program "SAPLV60U" in "VBUK_BEARBEITEN".
    The main program was "SAPMSSY4 ".
    The termination occurred in line 503 of the source code of the (Include)
    program "LV60UF0V"
    of the source code of program "LV60UF0V" (when calling the editor 5030).
    Processing was terminated because the exception "CX_SY_OPEN_SQL_DB" occurred in
    the
    procedure "VBUK_BEARBEITEN" "(FORM)" but was not handled locally, not declared
    in the
    RAISING clause of the procedure.
    The procedure is in the program "SAPLV60U ". Its source code starts in line 469
    of the (Include) program "LV60UF0V "."
    Please assist how to proceed further ..
    Many thanks
    Mujeeb.

    Sorry, THe correct note is 402221.
    Description from the note
    << Please do not post SAP notes - they are copyrighed material >>
    Edited by: Rob Burbank on Feb 22, 2009 3:46 PM

Maybe you are looking for