aspose file tools*
The moose likes JDBC and the fly likes [ASK] JDBC with SQL Server 2005 for concurrency problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "[ASK] JDBC with SQL Server 2005 for concurrency problem" Watch "[ASK] JDBC with SQL Server 2005 for concurrency problem" New topic
Author

[ASK] JDBC with SQL Server 2005 for concurrency problem

Leonardo Carreira
Ranch Hand

Joined: Apr 07, 2009
Posts: 489

Hi All,

I'm facing a problem with JDBC Transaction.
I use SQL Server 2005 as Database of my company's machine since the machine shipped with it.

This is the scenario of my problem :
Let say, i want to insert some records into tableA which is the record data is come from file, but at the same time i want machine has no problem in accessing tableA with different records without have to wait until my transaction is finished.
But if there's error inserting process, then the transaction will be rollback. And the machine will stay running smoothly without any problem.

What's the best transaction isolation level for this?

Here's just snippet of pseudo code of what i've done in my code. (Sorry just to simplify)


In that code, machine will have to wait till the process is finished.

Is there a way to solve this issue?..

Please help me, how to solve my problem..

Any help will be highly appreciated.

Thanks,
With warmest regards,

Leonardo Carreira

Sorry, perhaps my english language isn't too good.. Prepare for SCJP 6, Please God help me.. ☼
References : [Java.Boot] [JavaChamp] [JavaPrepare]
 
 
subject: [ASK] JDBC with SQL Server 2005 for concurrency problem