Please, witch structure ? (type of field)

bhays escribió:
>  
> 
> Reading a 50-byte character field with rddads under the current cvs 
> produces a 51-byte string with an extra garbage character at the end.
> 
>  
> 
> The attached prg and small dbf demonstrate the difference between rddads 
> and dbfcdx.
> 
> Notice the extra “r” at the end of the field, and how the length of the 
> string
> 
> len(field->descript) is different from fieldlen( fieldpos("descript"))
> 
> In my app, I was not seeing a problem in other fields, but after I tried 
> changing the length of
> 
> Descript and still had a problem, I changed the test to use the field 
> “CODE” and that fails too.
> 
> It does not fail on the 10-byte long field “CODETYPE”.
> 
>  
> 
> TestLen.prg :
> 
> #include "Ads.ch"
> 
> Request dBfCdx
> 
>  
> 
> function Main( cTarget, cSource )
> 
>    rddRegister( "ADS", 1 )
> 
>    rddsetdefault( "ADS" )
> 
>    AdsSetFileType(ADS_CDX)
> 
>  
> 
>    ? "USING ads"
> 
>    use codes
> 
>    ? trim(field->descript)
> 
>    ? fieldlen( fieldpos("descript")), len(field->descript), 
> asc(field->descript[-1])
> 
>  
> 
>    use codes via "dbfcdx"
> 
>    ? trim(field->descript)
> 
>    ? fieldlen( fieldpos("descript")), len(field->descript), 
> asc(field->descript[-1])
> 
>  
> 
>    ?
> 
> return
> 
>  
> 
> Output:  
> 
> USING ads
> 
> Test Descript (shows extra 51st char):            r
> 
>         50         51        114
> 
> Test Descript (shows extra 51st char):
> 
>         50         50         32
> 
>  
> 
> --
> 
> Brian Hays
> 
> Abacus Data Systems, Inc.
> 
>  
> 
> 
> 
> __________ Información de ESET NOD32 Antivirus, versión de la base de 
> firmas de virus 4158 (20090616) __________
> 
> ESET NOD32 Antivirus ha comprobado este mensaje.
> 
> http://www.eset.com
> 
> 
> ------------------------------------------------------------------------
> 
> ------------------------------------------------------------------------------
> Crystal Reports - New Free Runtime and 30 Day Trial
> Check out the new simplified licensing option that enables unlimited
> royalty-free distribution of the report engine for externally facing 
> server and web deployment.
> http://p.sf.net/sfu/businessobjects
> 
> 
> __________ Información de ESET NOD32 Antivirus, versión de la base de firmas 
> de virus 4158 (20090616) __________
> 
> ESET NOD32 Antivirus ha comprobado este mensaje.
> 
> http://www.eset.com
> 
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> xHarbour-developers mailing list
> xHarbour-developers@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/xharbour-developers
> 
> 
> 
> __________ Información de ESET NOD32 Antivirus, versión de la base de firmas 
> de virus 4158 (20090616) __________
> 
> ESET NOD32 Antivirus ha comprobado este mensaje.
> 
> http://www.eset.com
> 



__________ Información de ESET NOD32 Antivirus, versión de la base de firmas de 
virus 4211 (20090702) __________

ESET NOD32 Antivirus ha comprobado este mensaje.

http://www.eset.com



------------------------------------------------------------------------------
_______________________________________________
xHarbour-developers mailing list
xHarbour-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xharbour-developers

Reply via email to