Subject Re: [ib-support] Null
Author Lucas Franzen
Rohit Gupta schrieb:


> Unfortunately the defaults in Interbase do not work when using IBO.

They do and don't work in IBO as within any other tool.

If you select ALL fields of a table, do an INSERT and POST on the client
side there are ofcourse NO DEFAULT values since the server doesn't
receive NULL (it will receive an empty string for chars/varchars and 0
for integers).
Defaults do ONLY apply when the "value" IS NULL (well in fact that's not
a value, it's more the "absence of a value").

If you do an INSERT statement on your own with any ohter tool there
won't be any default value assigned as long as the server's not receving
NULL for that field, so you would have either
- omit it
or
- explicitely set it to NULL
before executing this statement.

So omit the fields you want to be defaulted by the server from your
select clause, or retrieve the default values (not very practicabvle
since slow), or look at the REQUIRED property (or sth. like this), or
....

AND: go ahead and ask this question in the IBObjects group!

That clients are handling a NULL-string as '' and NULL Integers as 0 is
just for your convenience since otherwise you would never be able to
handle them AsString or AsInteger without asking for IsNull before.

Or can you tell me how a NULL (NIL) should be represented in an Integer
variable?


Luc.

>
> IBO should save '' and 0 for nulls in strings and integers.
>
> ----- Original Message -----
> From: "Woody" <woody.tmw@...>
> To: <ib-support@yahoogroups.com>
> Sent: Friday, 8 June 2001 12:08
> Subject: Re: [ib-support] Null
>
> > simply put in
> >
> > where (Field is null or Field < 0)
> >
> >
> > HTH
> > Woody
> >
> > ----- Original Message -----
> > From: Sandeep
> > To: ib-support@yahoogroups.com
> > Sent: Thursday, June 07, 2001 7:07 PM
> > Subject: [ib-support] Null
> >
> >
> > I have some columns where I have some null values. When I query
> > the table with condition like [field < 0] i don't get the records with
> > null values. I have prdefined conditions in my application and I don't
> > want to change these. How do I get around this problem.
> >
> > Thanx in advance
> >
> > Sandeep
> >
> > Software Developer
> > CFL
> > sandeep@...
> > http://www.cfl.co.nz
> >
> >
> > Yahoo! Groups Sponsor
> >
> >
> >
> > To unsubscribe from this group, send an email to:
> > ib-support-unsubscribe@egroups.com
> >
> >
> >
> > Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
> >
> >
> >
> > [Non-text portions of this message have been removed]
> >
> >
> > To unsubscribe from this group, send an email to:
> > ib-support-unsubscribe@egroups.com
> >
> >
> >
> > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
> >
> >
>
> To unsubscribe from this group, send an email to:
> ib-support-unsubscribe@egroups.com
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/