Board index » delphi » NULLING Text fields in SQL Server 6.5

NULLING Text fields in SQL Server 6.5

Does anyone out there know how to NULL a text field in SQL Server 6.5.  I am
using Delphi 3 with BDE 5.01.  Anything that I have tried has not made the
field completly null.  Thanks for the help in advance.

Ray Oberg

 

Re:NULLING Text fields in SQL Server 6.5


Quote
Ray Oberg wrote:

> Does anyone out there know how to NULL a text field in SQL Server 6.5.  I am
> using Delphi 3 with BDE 5.01.  Anything that I have tried has not made the
> field completly null.  Thanks for the help in advance.

> Ray Oberg

FieldByName('MyTextField').Clear;

Does that do it?

RKR
--

                   \|||/
                   /'^'\
                  ( 0 0 )
--------------oOOO--(_)--OOOo--------------
. Reid Roman                              .
. Programmer / Analyst                    .
. TVisualBasic := Class(None)             .
. May the Source be With You              .
-------------------------------------------
. Auto-By-Tel (http://www.autobytel.com)  .
. Irvine, CA U.S.A                        .
. E-Mail : rkroman (at) home (dot) com    .
-------------------------------------------

Re:NULLING Text fields in SQL Server 6.5


Tried that already.  The field is not NULL.

Ray Oberg

Quote

>> Ray Oberg

>FieldByName('MyTextField').Clear;

>Does that do it?

Re:NULLING Text fields in SQL Server 6.5


Setting a field to NULL is a two step process.  You must set the datatype
and call Clear.  Just calling clear does not set the datatype.  There's
something about this in the VCL help file somewhere.  Here's an example:

 qryTransactions.ParamByname('RECVDAT').DataType := ftDateTime;
 qryTransactions.ParamByname('RECVDAT').Clear;

Jamie Burks

Quote
Ray Oberg wrote in message <7gd3ft$r7...@forums.borland.com>...
>Tried that already.  The field is not NULL.

>Ray Oberg

>>> Ray Oberg

>>FieldByName('MyTextField').Clear;

>>Does that do it?

Re:NULLING Text fields in SQL Server 6.5


How are you deciding that the field is not NULL?

Quote
Ray Oberg wrote:
> Tried that already.  The field is not NULL.

> Ray Oberg

> >> Ray Oberg

> >FieldByName('MyTextField').Clear;

> >Does that do it?

--
Kevin Davidson
QS Technologies, Inc.
Suite 1106 NationsBank Plaza, Greenville, SC 29601
ke...@qsinc.com
voice: (864) 232-2666 / fax: (864) 370-2230

Other Threads