JBO-25014: Another user has changed the row with primary key oracle.jbo.Key[x] - oracle-adf

I'm working on a project "maintenance project" and it contents of sender and receiver,I'm using same table ,same EO and VO for process..
i have a problem when i update records this massage shown"Another User Have changed the Row with Primary Key"
im using oracle jdevolper 12c with DB 11g

Several posts that answer this - Start with the Oracle Support link:
https://support.oracle.com/knowledge/Oracle%20Cloud/2502497_1.html
https://cedricleruth.com/how-to-fix-oracle-jbo-rowinconsistentexception-jbo-25014-another-user-have-changed-the-row-with-primary-key-in-adf/
https://www.jobinesh.com/2011/02/yet-another-reason-for-jbo-25014.html
https://tfathy.blogspot.com/2011/04/another-user-has-changed-row-with.html

Related

MS Access <> SQL Server : save current record which creates GUID in SQL and go back to this record

The title is maybe not the best. My current setting: MS Access frontend with a SQL Server backend.
The SQL Server backend will create the PK with a GUID as soon the row is saved.
I need to save my record and go back to that record to use the created PK GUID.
When I do a Me.Refresh or Me.Requery, it will loose the connection to the record showing #Name? on all fields.
I need to get to GUID because I want to upload a file which is done in a FILESTREAM table and the link to the content table is done via the GUID of the content table.
So I need the content table GUID but as the record is not yet saved, I don't have one.
How to save the record, get its GUID and "stay" on that record?
I tried following which is not working:
DoCmd.RunCommand acCmdSaveRecord 'Here it will show '#Name? on all fields
Me.Refresh
Use Me.Requery instead of Me.Refresh and hope you stay on the same record. You can, of course, navigate to the last record, which opens a small door for race conditions (someone could in theory insert a record between you saving yours and you requerying).
Access does strange things to add records and then fetch the default data, as can be read here. It doesn't play well with GUID columns (or, really, anything that isn't a numeric identity primary key column without triggers). By forcing a requery you refetch all data.
Alternatively, you can bind the form to an ADO recordset and work with that, but that approach has some problems on its own, such as trouble with the built-in refresh/filter/sort options.

When I create a new form in mvc that time the id value is showing 0

I am Trying to Create a CRUD operations using mvc and wcf and entity framework
When I try to add a new form does not work and no error message appears.
But the edit and delete operations are working fine. Only it's not creating the new form that time the id value is 0 it's not getting an ID value.
I am trying more times.but it's not getting proper solutions. So Give me one Solution
I published the project on public website if you want to check.
Link: http://s000.tinyupload.com/index.php?file_id=40899801495052398066
The database name is "mydemo"
Thanks,
Pari
Based on your EDMX model Id's Store Generated Pattern is not set to Identity.
but since your sql query for creating Table has Identity for Id column, I suggest removing your EDMX and create it again.
Id column in database should be primary key. If a column is identity and is not primary key, Its value is showing 0.

Tables Designs in SQL database

I am planning to move my access database to sql server using SSMA. I have a Column called Eligibility which have drop down list values as shown in Image. After Converting to sql I realized it doesn't have drop down list option. Can anybody suggest what will be the best solution of my situation? Either I can have any other option to design table in SQL which can hold List Values?
You can do one of the following:
Add CHECK constraint to Eligibility field allowing only a set of predifined values to be inserted into that field, as suggested in comment.
Better solution would be to create Eligiblity table (with id and value fields), and reference this table from main table by id field, possibly creating a PK-FK relationship. This way:
a) Only values from Eligibility table would be allowed. b) You could change and add entries in Elibility table without need to change constraint every time. c) A frontend application could use Elibility table to add drop-down functionality.
SQL Server does not work the same as access. It does not have dropdown option for you to choose from.
The proper way to implement dropdown option with SQL Server as database is to have another application as a front-end and let user access through the application. That way it is easier to manage security.

Can AS/400 Database Tables Be Hidden?

I was trying to delete a record from a table in AS/400 database. I got an error message saying that there is a referential integrity to another table XYZ in the same Schema ABC.
To my wonder, that table was not in the list of the tables shown by my DbVisualizer database client.
Then I decided to do a select on that table (ABC.XYZ) - but I got the records back. Thinking that it might be a client problem, I used another Client (AS/400 Operations Navigator) - I had the same results: table not on the list, but got the results back when I did a SELECT * FROM ABC.XYZ
My questions is, can the AS/400 tables be hidden in such a manner?
(Please note that the table was not even in the views/system table/Alias/Materialized Query Table)
Tables can be "hidden" via authorities on the object. Do you have *ALLOBJ authority?

Remove autogenerate GUID column from Add Entry pages in Dynamic Data Web Application

I have a Dynamic Data Entities Web Application that uses a database with GUIDs as primary keys for tables. All of the GUID fields have the default value set to NEWID() so SQL Server will generate a new GUID for any record. However in my dynamic data web site, in the insert new entry pages the GUID field shows up and it is expected for the user to enter data. How could I prevent the field from being displayed?
According to MSDN:
"You can hide the primary key as you do any other column by using the Scaffold attribute and setting its value to false. Because automatically generated keys are not recognized, the default Insert page templates do not work with EDM for tables that have automatic primary keys unless you create a partial class for the entity and apply the Scaffold attribute with a value of false."
Also, as an aside it's preferable to use "newsequentialid()" for the default value of Guid if you're using SQL Server 2005 or higher as it's more efficient for inserting.
Not the right Answer..
After doing this, which I did, you can insert 1 record which will get a GUID with all zero's. After that you will get no error message at all, but you will be unable to insert any more records, because of the unique index constraint on the guid ( which is a primary key of course ).
To really solve this problem, you have to edit the emdx file and add the
StoreGeneratedPattern="Identity"
into your Guid property tag under the "SSDL content" comment. Example:
<Property Name="Guid" Type="uniqueidentifier" Nullable="false" StoreGeneratedPattern="Identity"/>
If yhou do this in the designer within visual studio it will annotate the property tag under the "CSDL content" comment which doesn't work..
Used Entity Framework 4.0 Visual studio 10 and .NET framework 4.0

Resources