db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oystein.Grov...@Sun.COM (Øystein Grøvlen)
Subject Re: Simple question about Derby and Transactions
Date Mon, 22 Aug 2005 08:56:30 GMT
>>>>> "KK" == Kostas Karadamoglou <karadamoglou_k@yahoo.gr> writes:

    KK> Hello,
    KK> I am new to Derby and to Transactions in general.

    KK> I want to perform some tasks to my databases using one thread and lock
    KK> the table that it uses from the remaining threads.



    KK> My qyestion is simple!

    KK> Haw can this be done with Jdbc and Derby?

I think you need to consult a JDBC text book and the Derby manuals in
order to learn JDBC.  You could also learn something from the example
programs that comes with Derby.

In order to lock a table for the rest of a transaction you can execute
the SQL statement: LOCK TABLE t IN EXCLUSIVE MODE;

-- 
Øystein


Mime
View raw message