Home > Archive > Getting Started with dBASE > March 2006 > Set Autonullfields Off ?









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Set Autonullfields Off ?
leander

2006-03-21, 8:24 pm


I am appending to level 7 table using dbase plus demo. I dont want to
make any difference between empty and null fields. I tried using SET
AUTONULLFIELDS OFF, however this did noting , and null fields still
remained after appending or adding rows. Could someone help me pls
...10q



--
leander
------------------------------------------------------------------------
Posted via http://www.webservertalk.com
------------------------------------------------------------------------
View this thread: http://www.webservertalk.com/message1441527.html

Ken Mayer [dBVIPS]

2006-03-22, 9:23 am

leander wrote:
> I am appending to level 7 table using dbase plus demo. I dont want to
> make any difference between empty and null fields. I tried using SET
> AUTONULLFIELDS OFF, however this did noting , and null fields still
> remained after appending or adding rows. Could someone help me pls
> ..10q


You need to show us the code you're using ...

Ken

--
/(Opinions expressed are purely my own, not those of dataBased
Intelligence, Inc.)/

*Ken Mayer* [dBVIPS]
/Golden Stag Productions/
dBASE at goldenstag dot net
http://www.goldenstag.net/dbase/dBASEBook.htm
http://www.goldenstag.net/GSP
http://www.goldenstag.net/dbase
Roland Wingerter

2006-03-22, 9:23 am

Ken Mayer [dBVIPS] wrote

>
> You need to show us the code you're using ...

------
Hi Ken,

try the code below...

Roland


// Test: Bug with SET AUTONULLFIELDS?
clear
cAutonull = set("autonullfields")

SET AUTONULLFIELDS OFF

set database to; close tables
if _app.databases[1].tableExists("autonulltest")
_app.databases[1].dropTable("autonulltest")
endif

create table autonulltest (ID char(3), Name char(10))

insert into autonulltest (ID) values ('001')
insert into autonulltest (ID) values ('002')

use autonulltest excl
copy to autonulltest deli
set safety off
zap
set safety on

? "AUTONULLFIELDS is", set("autonullfields")
append from autonulltest deli

go top
if name = NULL
? "Bug: Table contains NULL value"
else
? "OK"
endif

close tables

SET AUTONULLFIELDS &cAutonull






Ken Mayer [dBVIPS]

2006-03-22, 8:25 pm

Roland Wingerter wrote:
> Ken Mayer [dBVIPS] wrote
>
>
> ------
> Hi Ken,
>
> try the code below...


I have the impression this may have been reported as a bug previously.
If not, wanna post it? <g>

Ken

--
/(Opinions expressed are purely my own, not those of dataBased
Intelligence, Inc.)/

*Ken Mayer* [dBVIPS]
/Golden Stag Productions/
dBASE at goldenstag dot net
http://www.goldenstag.net/dbase/dBASEBook.htm
http://www.goldenstag.net/GSP
http://www.goldenstag.net/dbase
Roland Wingerter

2006-03-23, 3:26 am

Ken Mayer [dBVIPS] wrote

>
> I have the impression this may have been reported as a bug previously. If
> not, wanna post it? <g>

-------
I have posted it, just in case...

Thanks

Roland


Roland Wingerter

2006-03-23, 3:26 am

"leander" wrote

>
> I am appending to level 7 table using dbase plus demo. I dont want to
> make any difference between empty and null fields. I tried using SET
> AUTONULLFIELDS OFF, however this did noting , and null fields still
> remained after appending or adding rows.

------
I reported this as a bug. Till it gets fixed you have several options:
- check out KILLNULL.EXE at http://www.dbase-tools.de/ (in German)
- write your own code
- live with NULLS

Roland


Roland Wingerter

2006-03-23, 3:26 am

Roland W. schrieb
> Till it gets fixed you have several options:

------
You could also change the table level in the BDE to level 5. Level 5 has no
nulls but also lacks Autoincrement fields and some other features.

Roland


Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com