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 - Optionally add insert statements into sql history
Summary: Optionally add insert statements into sql history
Status: RESOLVED WONTFIX
Alias: None
Product: db
Classification: Unclassified
Component: DB schema (show other bugs)
Version: 6.x
Hardware: PC Windows XP
: P3 normal (vote)
Assignee: Libor Fischmeistr
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-04-14 11:04 UTC by Michael Nazarov
Modified: 2014-09-28 18:29 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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').