This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Tried inserting a record into a Java DB database after installing NetBeans and I get this error after entering the new record information and clicking OK: Inserting Record to Java DB returns Syntax error encountered "PUBLIC" at line 1, column 13. Clicking the Show SQL button before clicking OK in the Insert Record window produces the following SQL code: INSERT INTO PUBLIC.CUSTOMER (SSN, CUST_NAME, ADDRESS) VALUES ('123-45-6789', 'Bob Smith', '1234 Nowhere Ln, BFE') Database and tables were created from the StockMarket.sql file while following Java SE Application Development-2851-SE6 class. This is the contents of the SQL file: CREATE TABLE Customer ( ssn CHAR(15) NOT NULL, cust_name CHAR(40), address CHAR(100) ); CREATE UNIQUE INDEX idx1 ON Customer (ssn); CREATE TABLE Shares ( ssn CHAR(15) NOT NULL, symbol CHAR(8) NOT NULL, quantity INT ); CREATE TABLE Stock ( symbol CHAR(15) NOT NULL, price real ); System Information: Mac Pro (dual-core Intel Xeon) Mac OS X 10.5.5 4GB RAM Installed NetBeans from website using the Java pack (SE, Web/EE, GlassFish V2 & V3)
This looks like an Quoter issue. Only when you create a database called "PUBLIC" this fails, since PUBLIC is a key word and need to be quoted. if you right click on the table and select View Data it will generated SELECT * from PUBLIC.Customer, which also fails, for the same reason. It will be nice if we can fix this quoter, since Data View also uses quoter to determine whether to quote or not. For now I will use quote always to fix this issue.
http://hg.netbeans.org/main/rev/07607a90caa1
The Quoter issue has to do with quoting keywords. See Issue 121018. On our list for 7.0...
deejross, can You verify please with latest build that this issue was really fixed?
Integrated into 'main-golden', will be available in build *200812111401* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/07607a90caa1 User: ahimanikya@netbeans.org Log: Issue #155140 Inserting Record to Java DB returns Syntax error encountered "PUBLIC"