URGENT: JDeveloper : Error in Updation through ViewObject

N

Nitin Goyal

Hi

I am getting a very simple but annoying problem. I have made a
business component project in which I have created a ViewObject named
"CountryView" using table in SQL Server. Table consists only two
columns CountryId (which is primary) and CountryName.

Uptill this it is smooth But when I test CountryView using Application
I am getting error in updating a record. When I change countryName
[haven't touched countryId] and then try to move on to next record, I
get error "FOR UPDATE clause cannot be specified with READ ONLY
CURSOR".

I read some docs on net and get to know that I have to set application
module's locking mode : optimistic. I did this and I can now move on
to next record. But when I try to commit data I again get the same
error i.e. "FOR UPDATE clause cannot be specified with READ ONLY
CURSOR". I have tried it with two Drivers "Microsoft" and "DataDirect"
but it has been of no use.

I am using
RDBMS : SQL SERVER
SQL Flavor : SQL92
Made view by selecting table from database
Connection url :
jdbc:microsoft:sqlserver://localhost:1433;SelectMethod=cursor;DatabaseName=june07

You may use SelectMethod=direct. This error still comes. Strange thing
is when I try the same thing on an Oracle Server and with SQL Flavour
Oracle then it works fine.

I would like to get the answers of following Qs.

1. Why JDeveloper APIs use a "Select FOR UPDATE" query when I have
called for commit and not just moving on to next record after
updating. There must be some queries to check if the record has been
locked by someone else.

2. Am I using a wrong Driver / doing something [incorrect / foolish]
or it is just a myth that JDeveloper + ADF APIs and SQL server are
compatible using a third party Driver.

and finally i will be grateful if someone can tell me how to bypass
this.


Thanks
Nitin Goyal
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,225
Members
46,815
Latest member
treekmostly22

Latest Threads

Top