PDA

View Full Version : URGENT: JDeveloper : Error in Updation through ViewObject


Nitin Goyal
06-24-2004, 06:00 AM
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


MyLounge.com Site Map
Forum: Cars, Cell Phone, Database, Games, Home Improvement, IT, Music, School, Sports, Web Design, Web Server, Weight Loss

The MyLounge.com forum is intended for informational use only and should not be relied upon and is not a substitute for any advice. The information contained on MyLounge.com are opinions and suggestions of members and is not a representation of the opinions of MyLounge.com. MyLounge.com does not warrant or vouch for the accuracy, completeness or usefulness of any postings or the qualifications of any person responding. Please consult a expert or seek the services of an attorney in your area for more accuracy on your specific situation. Please note that our forums also serve as mirrors to Usenet newsgroups. Many posts you see on our forums are made by newsgroup users who may not be members of MyLounge.com Term of Service