You must insert a SPACE between sql statement:
         String str="update ssmcustomers s set"+
                 " s.customername.FirstName='" + firstName +"'," +
        General: you can output SQL statement to std or log fle in order to
debug SQL
        Chatrles



> -----Original Message-----
> From: SSM Technologies [SMTP:[EMAIL PROTECTED]]
> Sent: Friday, January 05, 2001 7:27 PM
> To:   [EMAIL PROTECTED]
> Subject:      Cannot update database row in Oracle 8i through BMP
>
>
>  Hi everybody,
>
>  We can add & delete rows from the database (Oracle 8i) using EntityBean
>  (Bean Managed Persistence).
>  But when we try to update  rows in the database it gives the following
> exception:
>
>  The ERROR : RemoteException occurred in server thread; nested exception
> is:
>  java.rmi.RemoteException: Transaction aborted (possibly due to
> transaction
>  time out).;
>  nested exception is: javax.transaction.RollbackException
>
>  Code is as follows:
>
>  String str="update ssmcustomers s set"+
>          "s.customername.FirstName='" + firstName +"'," +
>          "s.customername.LastName='" + lastName + "'," +
>          "s.customername.middlename='" + middleName + "'," +
>          "s.customername.salutation='" + salutation + "'," +
>          "s.customerduration.fromdate=to_date('" + fromDate + "','MON
> DD,YYYY')," +
>          "s.customerduration.todate=to_date('" + toDate + "','MON
> DD,YYYY')
> " +
>          "where s.customernumber='" + customerNumber + "'" ;
>
>  getDBConnection();//This is method for connection with database
>  Statement stmt = dbConnection.createStatement();
>
>  int resultCount = stmt.executeUpdate(str);          <--Exception is
> thrown
>  at this point
>
>  Thanks...........................
>         SSMTech
>
> ==========================================================================
> =
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the
> body
> of the message "signoff EJB-INTEREST".  For general help, send email to
> [EMAIL PROTECTED] and include in the body of the message "help".

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to