David:
Here is the easy answer:
Select Database Designer from the toolbar
Select Modify an existing table
Select the name of the table that you want to modify
Select columns from the tab menu at the top of the RBDesign window
Select the column to which you want to add a default value
In the middle of the screen there are 2 boxes: Description and Default
Enter the default value that you want to use (N) in the default box (no
quotes needed)
Select Table from the tab menu at the top of the RBDesign window
Click Save and exit
Now, whenever you add a new record and do not specify a value for your
column, it will have a default value of "N" (without the quotes)

I hope this helps
Javier,

Javier Valencia, PE
President
Valencia Technology Group, L.L.C.
14315 S. Twilight Ln, Suite #14
Olathe, Kansas 66962-4578
Office (913)829-0888
Fax (913)649-2904
Cell (913)915-3137

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of David Torre
Sent: Tuesday, September 16, 2003 7:32 PM
To: RBASE-L Mailing List
Subject: [RBASE-L] - Re: project and null values problem

Maybe if I explain this better, someone will have a better
solution.  Essentially, when I insert rows into the table, I'm not
specifying a value for backordered.  Whenever I don't mention the field,
R:Base puts the null value -0- in the field.  I want to make it so if I
don't specify the field backordered in my INSERT statement, backordered is
set to 'n' instead of -0-.

If the method I want is impossible to do in R:Base, I'd like to know. In
that case, I'll use that other method you specified. I prefer to change
this at the database level rather than at the program level.

At 05:00 PM 9/16/2003 -0700, you wrote:
>Bill Downall had the right answer. Thats how i would do it.
>
>On 16 Sep 2003 at 15:28, David Torre wrote:
>
> > That wasn't quite the solution I had in mind.  I could do that every
place
> > that I work with the table containing "backordered," or I could set a
rule
> > or something and make it automatic.  It seems easier to do the
> latter.  Can
> > I do this in R:BASE?
> > -David
> >
> > At 11:26 AM 9/15/2003 -0700, you wrote:
> > >     INSERT INTO YourTableName (BackOrdered) VALUES +
> > >     ('n')
> > >
> > >
> > >On 15 Sep 2003 at 11:08, David Torre wrote:
> > >
> > > > Hello there,
> > > >
> > > > I have a 1 character text field called backordered that I want to
> default
> > > > to "n."  I went into rbd and set the default value to "n," and that
> took
> > > > care of all the existing fields.  However, whenever I insert rows,
> > > > backordered is set to NULL and this is causing some problems with a
> > > project
> > > > where backordered<>'y'.  Is there a rule or something I can set to
make
> > > > sure that backordered is never set to a NULL value, that instead of
> NULL,
> > > > it is set to n?
> > > >
> > > > -David
> > > >
> > > >
> > >
> > >
> > >
> > >Victor Timmons
> > >Tiz's Door Sales, Inc
> > >425-258-2391
> >
> >
>
>
>
>Victor Timmons
>Tiz's Door Sales, Inc
>425-258-2391

Reply via email to