Please use the Apache issue tracking system for new NetBeans issues ( !!
Bug 15404 - Fault occurs in data type Default value.
Fault occurs in data type Default value.
Product: db
Classification: Unclassified
Component: Code
Sun Solaris
: P4 (vote)
: 3.x
Assigned To: Radko Najman
Depends on:
  Show dependency treegraph
Reported: 2001-09-12 15:18 UTC by issues@www
Modified: 2005-03-09 04:28 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT


Note You need to log in before you can comment on or make changes to this bug.
Description issues@www 2001-09-12 15:18:41 UTC
The reappearance method of a bug. 
1. A table is created.(Image1.tif and Image2.tif)
 "Create Table" a dialog -- "name", "type(CHAR or VARCHARA2)", "size", and 
a "default value(1)" -- it sets up and a "OK" button is pushed.

2.Greb Structure.(TEST1.grab)
  "Greb Structure" a dialog -- "file name",it sets up  a "Save" button is 

3.Delete Table.
  The table created by "1." is deleted.

4.Recrate Table.
  "Recreate Table" a dialog -- The file created by" 2." is chosen and the 
button "OPEN" is pushed.

5.Name the Table.(Image3.tif)
  "Name the Table" a dialog -- The button "OK" is pushed.

  An "Error" dialog displays.
  Create Table Type(CHAR or VARCHARA2).
  Since ''1'' is in default value, it becomes an error. It will OK, if '1' is 
in default value.

--It generates also en build/C locale.

*Oracle 8i v8.1.7/Oracle thin driver
*IBM DB2/DB2 jdbc driver
xxx@xxxx 2001-07-23

In the case of "MS SQL 2000/weblogic driver", it became the following errors.
  An "Error" dialog displays.
  Create Table Type(CHAR or VARCHARA2).
  Since '('1')' is in default value, it becomes an error. It will OK, if '1' is 
in default value.

*MS SQL 2000/weblogic driver
xxx@xxxx 2001-07-24

The problem is that for character data types is the default value encapsulated 
in two '(apostrophe) characters instead of one in the generated DDL command. 
There is an easy workaround for this - user can modify the command and remove 
the redundant ' character.

A comment.
Comment 1 Radko Najman 2001-10-08 14:20:45 UTC
Fixed. Default values of character data types are encapsulated in one '(apostrophe) 
character now.
Comment 2 David Kaspar 2002-11-18 13:46:20 UTC
Bug is not fixed correctly.

How to reproduce:
1) Create table with one VARCHAR column with default value: "DEFVAL1".
I'm using MSSQL driver.
2) Grab its structure.
3) Delete table.
4) Recreate table.
5) ERROR - See Command from recreating table. It is:
create table "Test!"
	"COL" CHAR(20) default '('DEFVAL1')'
6) NOTE - It should be like this (no outter single-quotes exists):
create table "Test!"
	"COL" CHAR(20) default ('DEFVAL1')
Comment 3 Radko Najman 2003-01-22 15:02:55 UTC
Fixed in trunk.
Workaround for MSSQLServer - default value is encapsulated in () so I
can't generate '()'
Comment 4 Martin Schovanek 2003-03-12 13:37:28 UTC
Comment 5 Quality Engineering 2003-06-30 17:17:55 UTC
Resolved for 3.3.x or earlier, no new info since then -> closing.

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo