Will setkeycolumns of cachedrowset validates duplicate entery?
Whether the setkeycolumns of cachedrowset method will do the null and duplicate validation at the time of save method call?
If no, then how to perform primary key validation in cachedrow set.
Re: Will setkeycolumns of cachedrowset validates duplicate entery?
Moved from New to Java
db
Re: Will setkeycolumns of cachedrowset validates duplicate entery?
Looking at the API there is nothing in the contract that says that the primary key must be checked before the acceptChanges is called.
I suspect this is because it is unlikely that a CachedRowSet will represent the whole contents of a table, so any check will be incomplete anyway.
So, it's implementation dependent.
Run it with whatever JDBC implementation you're using and see.
If it doesn't validate then you'll simply have to work something out around when the update/insert is done on the database.
Re: Will setkeycolumns of cachedrowset validates duplicate entery?
ok thanks for the reply.
Can i able to upate more than one table (multi table update) in cached row set
Re: Will setkeycolumns of cachedrowset validates duplicate entery?
I have no idea.
I suspect it first off depends on whether the database supports it (some may not), and the second whether the JDBC driver does.
Should be easy to set up a basic test of the concept.