On Wed, 13 May 2009, AbeB wrote: Hi, > with the following test.prgProc MAIN() > ---------- > REQUEST ADS > AdsSetServerType( 1 ) > > dbCreate( "test.DBF", {; > { "ITEMID", "C", 8, 0 }, ; > { "ITEM", "C", 12, 0 }, ; > { "CLASS", "C", 8, 0 }, ; > { "SUB", "C", 8, 0 }, ; > { "CQTY", "N", 7, 2 }, ; > { "R_PAK_BULK", "C", 1, 0 }, ; > { "C_PAK_BULK", "C", 1, 0 }, ; > { "LDESC", "C", 30, 0 }, ; > { "MAN", "C", 15, 0 }, ; > { "BRAND", "C", 15, 0 }, ; > { "SHELF", "C", 6, 0 }, ; > { "DESC", "C", 40, 0 }, ; > { "MINS", "N", 8, 2 }, ; > { "ONHAND", "N", 15, 2 }, ; > { "PRICE", "N", 6, 2 }, ; > { "PRICE2", "N", 6, 2 }} ) > USE test VIA "ADS" SHARED > for lop := 1 to 100 > append blank > NEXT > BROWSE() > ------------ > and make command > hbmk2 test -lrddads -lace32 > now look at field DESC it's being expended to lenght 41 with a garbage > character at the end.
It seems to be ACE bug. Not Harbour. Here is reduced example: REQUEST ADS proc main() adsSetServerType( 1 ) rddSetDefault( "ADS" ) dbCreate( "test.dbf", { { "F", "C", 24, 0 } } ) USE test while lastrec() < 10 dbappend() field->F := repl( "1234567890", 10 ) enddo dbgotop() browse() For filed F shorted then 24 bytes AdsGetField() returns correct results but for longer it adds dummy char at the end. It should be reported to Extended System. Meanwhile I can add workaround and cut the filed to maximum size reported by table structure info but such hack will badly damage values if ADS introduce compressed fields which can be longer. best regards, Przemek _______________________________________________ Harbour mailing list Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour