Unanswered: new table is able to fetch the data but not able to store the data
Hope all are doing good.
I am quite new to DB.
I am using java swings and SQL Server Management Studio Express (2).
I want one new table in my DB suppose table B which must be like one existing table A.
So for that I created one table with the same columes and same datatype as in table A.
and In the java page I changed table A name by table B.
But I this doesn't work in a right way.
I am able to fetch the data from the new table,I am able to delete the data of new table but I am not able to add any data in the new table via application.I checked the code already.
Please suggest me what to do?
I haven't used it in a while, but I think that the Java Swing library depends on a table attribute to allow INSERT and UPDATE operations. Depending on the version of the Swing library, the needed table attribute can be either a PRIMARY KEY constraint or a UNIQUE INDEX.
If you apply the PRIMARY KEY constraint, your code should work on your new table.
First of all I created new table B same like table A because I want same functionality but want to store different data in table B.
Secondly as per the suggestion I applied the primary key constraint to the new table but still facing the same problem.
Here I am attaching one doc.Please take a look.As when I click on edit and save,it delete the record and when I will try to add and save it does nothing.