google-code-export / sqlite-manager

Automatically exported from code.google.com/p/sqlite-manager
1 stars 0 forks source link

does not show error inserting existing record with unique constraint defined #656

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. CREATE TABLE Brands(Id integer, BrandName text UNIQUE)
2. INSERT INTO Brands VALUES(1, 'Coca Cola')
3. INSERT INTO Brands VALUES(2, 'Pepsi')
4. INSERT INTO Brands VALUES(3, 'Pepsi')

What is the actual output?
no error generated

What is the expected output?
step 4 should show unique constraint error

What version of the product are you using? On what target Application Extension 
Version = 0.7.6
Application = Firefox 8.0
OS = windows xp sp3 latest updates
Example from: http://zetcode.com/databases/sqlitetutorial/constraints/

Please provide any additional information below. In some cases
errors/warnings may be logged in the Error Console (in Firefox) which is 
available under the Tools menu or using Ctrl+Shift+J. If you find any related 
to this extension, please report that too.

Output from error console:
Error: uncaught exception: [Exception... "Component returned failure code: 
0x80630003 (NS_ERROR_STORAGE_CONSTRAINT) [mozIStorageStatement.finalize]"  
nsresult: "0x80630003 (NS_ERROR_STORAGE_CONSTRAINT)"  location: "JS frame :: 
resource://sqlitemanager/sqlite.js :: <TOP_LEVEL> :: line 701"  data: no]

Original issue reported on code.google.com by ein...@gmail.com on 13 Nov 2011 at 5:57

GoogleCodeExporter commented 9 years ago
I have the same problem... but I don't have idea where it's the error...

Original comment by alexis...@gmail.com on 20 Dec 2011 at 1:14

GoogleCodeExporter commented 9 years ago
executed exactly the same sqls as above and got the following error in an alert 
window:
SQLiteManager: 
 INSERT INTO Brands VALUES(3, 'Pepsi'); [ column BrandName is not unique ]
Exception Name: NS_ERROR_STORAGE_CONSTRAINT
Exception Message: Component returned failure code: 0x80630003 
(NS_ERROR_STORAGE_CONSTRAINT) [mozIStorageStatement.execute]

Original comment by mrinal.k...@gmail.com on 24 Jun 2012 at 6:04