URGENT: JDeveloper : Error in Updation through ViewObject
Date: 24 Jun 2004 07:00:34 -0700
Message-ID: <1c3a0e9f.0406240600.3bef6773_at_posting.google.com>
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.
- 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.
- 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
Received on Thu Jun 24 2004 - 16:00:34 CEST