Error DBFNTX/1021 - Data width error 
Author Message
 Error DBFNTX/1021 - Data width error

Hello,

I've got another interesting problem which I'm not sure where the problem
lies.  I'm working with an existing program which imports records into an
existing database.  During the import, it crashes and gives:

DBFNTX/1021 - Data width error

I've looked at the data coming in and it all looks normal.  What does
this error mean exactly?

Thanks in advance,

Yves



Sat, 12 May 2001 03:00:00 GMT  
 Error DBFNTX/1021 - Data width error
: DBFNTX/1021 - Data width error

: I've looked at the data coming in and it all looks normal.  What does
: this error mean exactly?

        It means that the data in the import file is too big (i.e.,
too wide) to fit in the receiving database.  You can probably determine
which is the offending field by using a database utility (e.g., FoxPlus)
and browse thru the receiving database looking for asterisks (stars) in
one of the numeric fields. Then, finding this, examine the import file
to see what has to be changed.

-Mel



Sat, 12 May 2001 03:00:00 GMT  
 Error DBFNTX/1021 - Data width error

Quote:
> I've got another interesting problem which I'm not sure where the problem
> lies.

You'll also (as with your last question) find the answer in the manuals and
Norton Guides.

Quote:
> DBFNTX/1021 - Data width error

> I've looked at the data coming in and it all looks normal.  What does this
> error mean exactly?

It means what it says, that some bit of data is too large to fit in a given
field. Beyond that there is very little anyone in this Usenet group can do
because you are the one with the source code and the data. Why not look at
the line of code it fell over on? Give it a run with the de{*filter*} and see
what the actual data that causes the error looks like.

--
Take a look in Hagbard's World: |   w3ng - The WWW Norton Guide reader.
http://www.*-*-*.com/ |     eg - Norton Guide reader for Linux.
http://www.*-*-*.com/ |    weg - Norton Guide reader for Windows.
Free software, including........| dgscan - DGROUP scanner for Clipper.



Sun, 13 May 2001 03:00:00 GMT  
 Error DBFNTX/1021 - Data width error
[This followup was posted to comp.lang.clipper and a copy was sent to the
cited author.]



Quote:

> > I've got another interesting problem which I'm not sure where the problem
> > lies.

> You'll also (as with your last question) find the answer in the manuals and
> Norton Guides.

> > DBFNTX/1021 - Data width error

> > I've looked at the data coming in and it all looks normal.  What does this
> > error mean exactly?

> It means what it says, that some bit of data is too large to fit in a given
> field. Beyond that there is very little anyone in this Usenet group can do
> because you are the one with the source code and the data. Why not look at
> the line of code it fell over on? Give it a run with the de{*filter*} and see
> what the actual data that causes the error looks like.

I am working with an existing application created by someone else who did
not comment or structure their application.  The code is spread out in
about 150 or so seperate .PRG files and 60 .DBF files containing hundreds
of fields.  (all uncommented).  So tracing variables and stuff is really
hard.  I get the data width error when it is doing a SELECT <database>
statement.  So I'm really uncertain how to attack this...  I've never
used the clipper de{*filter*} (Yes, I know, well, clipper is not in big
demand around here so I don't program in it too often.).  I ran the
de{*filter*} against my program and got to the place the program crashes with
a data width error.  Nothing different in the errors.  Does the de{*filter*}
dump info to a file or something?  If so, what's it called?

Thanks in advance,

Yves



Sun, 13 May 2001 03:00:00 GMT  
 Error DBFNTX/1021 - Data width error
Yves Dagenais wrote (with editing):
Quote:
>  Does the de{*filter*}
> dump info to a file or something?  If so, what's it called?

Hi Yves.
Press F6 when you're in the de{*filter*} window.
It will show you workareas information.
If the program fails while SELECT, be sure that your file is really
opened at this moment. Also look carefully into file structure.
And post here a piece of code where the program fails and
the structure of the file.
--
Regards, Vladimir ( http://www.*-*-*.com/ )


Mon, 14 May 2001 03:00:00 GMT  
 Error DBFNTX/1021 - Data width error

Quote:
> > It means what it says, that some bit of data is too large to fit in a
> > given field. Beyond that there is very little anyone in this Usenet
> > group can do because you are the one with the source code and the
> > data. Why not look at the line of code it fell over on? Give it a run
> > with the de{*filter*} and see what the actual data that causes the error
> > looks like.

> I am working with an existing application created by someone else who did
> not comment or structure their application.  The code is spread out in
> about 150 or so seperate .PRG files and 60 .DBF files containing hundreds
> of fields.  (all uncommented).  

Sounds like your average Clipper application then <g> (seriously).

Quote:
> So tracing variables and stuff is really hard.  

The contents of the code-maintainer's toolbox should include at least a copy
of Click (see The Oasis ( http://www.*-*-*.com/ ~philb/)) and, if CLD doesn't
cut it for you, a copy of MrDebug ( http://www.*-*-*.com/ ).

Quote:
> I get the data width error when it is doing a SELECT <database> statement.

Hmm, I can't honestly say that I've ever seen this happen before.

Quote:
> So I'm really uncertain how to attack this...  I've never used the clipper
> de{*filter*} (Yes, I know, well, clipper is not in big demand around here so I
> don't program in it too often.).  I ran the de{*filter*} against my program
> and got to the place the program crashes with a data width error.  Nothing
> different in the errors.

Set a breakpoint (with MrDebug you could make this a conditional breakpoint
which makes things easier) some time before the line that gives the problem
and then step the code from there on and watch what happens. You'll be
getting a data width error for a reason, you need to find that reason and
you're best placed for finding it.

--
Take a look in Hagbard's World: |   w3ng - The WWW Norton Guide reader.
http://www.*-*-*.com/ |     eg - Norton Guide reader for Linux.
http://www.*-*-*.com/ |    weg - Norton Guide reader for Windows.
Free software, including........| dgscan - DGROUP scanner for Clipper.



Mon, 14 May 2001 03:00:00 GMT  
 Error DBFNTX/1021 - Data width error
? Yves Dagenais Y???? ?? T? ...

Quote:

>I am working with an existing application created by someone else who did
>not comment or structure their application.  The code is spread out in
>about 150 or so seperate .PRG files and 60 .DBF files containing hundreds
>of fields.  (all uncommented).  So tracing variables and stuff is really
>hard.  I get the data width error when it is doing a SELECT <database>
> statement.

It's hardly believable that you get the "data width error" while a SELECT <workarea> is performed,
since the documenation for this error is:
DBFNTX/1021  Data width error
     Explanation:  The value **assigned** to a numeric FIELD variable could
     not be accurately represented in the field width specified by the
     database structure.

Quote:
> So I'm really uncertain how to attack this...

Try this...
  Action:  Change the program to suppress invalid values or modify[*] the
  structure of the database (.dbf) file to allow for larger values.  DBU,
  the CA-Clipper Database Utility, can be used to modify the structure of
  a database (.dbf) file.

([*] I don't suggest you to modify the database structure before you check and spot the code-line (to do this, use cld and STEP into your code using F8) which actually bring on the problem, because doing so, you may give rise to other (and more) problems.)

--
Pit V



Mon, 14 May 2001 03:00:00 GMT  
 Error DBFNTX/1021 - Data width error
Yves,

  It means that a numeric field in the "receivinng" database is not long
enough to contain the new value.  Modify the structure to increase that
field width.

Alain Boucher

Quote:

> Hello,

> I've got another interesting problem which I'm not sure where the problem
> lies.  I'm working with an existing program which imports records into an
> existing database.  During the import, it crashes and gives:

> DBFNTX/1021 - Data width error

> I've looked at the data coming in and it all looks normal.  What does
> this error mean exactly?

> Thanks in advance,

> Yves



Tue, 15 May 2001 03:00:00 GMT  
 Error DBFNTX/1021 - Data width error
Hi Yves,
one field width of your database is smaller than the value of the incoming
data.
Example: NCASH, N, 10,2  (9999999.99), incoming value 123456789.99 ->
runtime errror DBNTX/1021.
Look at the NG-Files.
Greetings from good old Vienna
Leon Berger

http://www.berger-edv.at


Wed, 16 May 2001 03:00:00 GMT  
 Error DBFNTX/1021 - Data width error
To original author:

I can send a Prg to support a test of a problem field, such as:

nTempSum = MCHK7AMT+MSURVEY+MOTHERFEE+MFILREC

IF CheckDataWidth('FILINGFEE', nTempSum)
        REPLACE  FILINGFEE WITH  nTempSum
ELSE
        ALERT( "Cannot post the filing fee for;;" + ;
                PADR("Account " + MACCTNO, 20) + ";;" + ;
                PADR("Fee" + TRANSFORM(nTempSum, '99,999.99'), 20) + ";;" + ;
                "Call The Data Center",,"W/N")
ENDIF

Quote:
> one field width of your database is smaller than the value of the
incoming
> data.
> Example: NCASH, N, 10,2  (9999999.99), incoming value 123456789.99 ->
> runtime errror DBNTX/1021.



Wed, 16 May 2001 03:00:00 GMT  
 
 [ 10 post ] 

 Relevant Pages 

1. DBFNTX/1021 Error?

2. HELP: DBFNTX/1021

3. ERROR DBFNTX 1001 Flie open error

4. Error DBFNTX/1003 DOS ERROR 55

5. Error DBFNTX/1002 open error:

6. what is a DOS error code 170 DBFNTX/1001 open error =

7. Error DBFNTX/1003 and 1001, DOS Error 4 in Win 95

8. Help DBFNTX/1003, Open error ??????.NTX ( Dos Error 4 )

9. data width error

10. HELP Please - "Data Width Error"

11. Error(36) Invalid Data file / Error: Invalid Record Declaration

12. dbfntx/1001 error

 

 
Powered by phpBB® Forum Software