Blank space insertion into a Database field of VARCHAR2(1) [message #370592] |
Tue, 04 January 2000 03:27  |
Ajay Madan
Messages: 8 Registered: January 2000
|
Junior Member |
|
|
Hi !!
My application is on Oracle8i with Forms6.0. I have a Database Block which is based on the base Table which has a Delete Flag field with declaration - VARCHAR2(1) NOT NULL. This field is not displayed on the canvas. My application requires that I initialize this field with a single Blank space and then insert into the database. But whether directly or thru another variable I am not able to initialize and insert this value into the database. The table or the form variable does not accept this value at all. But In SQL. I am able to insert the record into the Database by giving a ' ' as value for the delete flag field. But I am not able to do the same using forms.
Can you help me out with this? How do I initialize this field with a single blank space?
Thanks and Regards,
Ajay
ajay_madan@usa.net
|
|
|
Re: Blank space insertion into a Database field of VARCHAR2(1) [message #370622 is a reply to message #370592] |
Tue, 11 January 2000 07:22  |
Sean Miller
Messages: 12 Registered: December 1998
|
Junior Member |
|
|
If you put a blank space into the field, then to all intents and purposes it's NULL.
Therefore, I would suggest you remove the NOT NULL constraint. Either that or instead of a space initially populate with a '.' or something.
An alternative would be to possibly declare as a CHAR rather than a VARCHAR, this might work, though I have difficulty understanding why you'd populate a NOT NULL column with a blank value in the first place.
Sean
|
|
|