Andreas Ernst wrote:
>
> Here is my Javacode:
> 
> dis.sql_error_lock_collision =
> "com.sap.dbtech.jdbc.exceptions.DatabaseException: SAP DBTech 
> SQL: [400]
> (at 64) Lock collision";
> try {
>   Class.forName( dis.sql_treiber);
>   conn_sperr = DriverManager.getConnection( dis.sql_url, dis.sql_user,
> dis.sql_password);
>   conn_sperr.setAutoCommit( false);
>   stat = conn_sperr.createStatement();
>   stat.execute("lock (nowait) row adressen key adnr = '" + 
> adnr + "' in
> exclusive mode");
>   stat.close();
> }
> catch (Exception ex) {
>   if ( ex.toString().equals( dis.sql_error_lock_collision)) {
>     sub.em("SIMON DIS - Adressen", "Der Datensatz wird schon
> bearbeitet!");
>   }
>   else {
>     sub.em("SIMON DIS - Adresse", "Der Datensatz konnte nicht gesperrt
> werden!\n" + ex);
>     dis.sql_cat.error( "Personen - Datensatz konnte nicht gesperrt
> werden " + adnr, ex);
>   }
>   adresse_gesperrt = false;
>   return ( false);
> }
> 
> After pressing the button to start the code the programm freezes.
> With Adabas this code works fine.
> 

There is a known bug with lock option nowait within 
version 7.3.0.1 til version 7.3.0.20.

If you use one of these versions please upgrade to 
version 7.3.0.21 (you will find it here
http://www.sapdb.org/sap_db_software.htm) 
and try again. 

If you are already on this version please let me know.

HTH.

Kind regards,
Holger
SAP Labs Berlin
_______________________________________________
sapdb.general mailing list
[EMAIL PROTECTED]
http://listserv.sap.com/mailman/listinfo/sapdb.general
  • Locking Andreas Ernst
    • Becker, Holger

Reply via email to