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.

Bug 184130

Summary: Optionally add insert statements into sql history
Product: db Reporter: Michael Nazarov <michaelnazarov>
Component: DB schemaAssignee: Libor Fischmeistr <lfischmeistr>
Status: RESOLVED WONTFIX    
Severity: normal    
Priority: P3    
Version: 6.x   
Hardware: PC   
OS: Windows XP   
Issue Type: ENHANCEMENT Exception Reporter:

Description Michael Nazarov 2010-04-14 11:04:42 UTC
If number of rows added using Insert Record(s) dialog it might be
useful to optionally insert corresponded sql statement into sql
history.
Comment 1 matthias42 2014-09-28 18:29:46 UTC
Sorry - with the current architecture this is counter productive. The system uses prepared statements with variable binding at execution time, so there is no complete insert, that is worth inserting into history.

The places in the gui, that generate sql "text" are best effort, but often not workable. For example on informix:

This works:

PreparedStatement ps = c.prepareStatement("INSERT INTO SAMPLE_TABLE (boolean_column) VALUES (?)"
ps.setBoolean(1, true);
ps.execute();

This fails:

Statement s = c.createStatement();
s.execute("INSERT INTO SAMPLE_TABLE (boolean_column) VALUES (true)");

Problem: The literal value is DB dependend (informix expects 't').