>>for i = 1 to .Tables.Count >> =.Tables[m.i].ToCursor(.T., 'cOrders') >> endfor>
>*------------------------------------------------------------------------------- >function do_it() > > local obj, i, TableObj, FieldObj > > obj = createObject('xmladapter') > > with m.obj > .LoadXml('\tmp\ppp.xml', TRUE, TRUE) > > for each TableObj in .Tables > for each FieldObj in m.TableObj.Fields > > if( inlist(lower(unicode_from(m.FieldObj.XmlName)), 'orderpk', 'customerfk') ) > FieldObj.DataType = 'C' > FieldObj.MaxLength = 36 > endif > > endfor > endfor > > > for i = 1 to .Tables.Count > =.Tables[m.i].ToCursor() > endfor > > > endwith >endfunc >*--------------------------------------------------------------------------- >function unicode_To(v) > return strconv(m.v, 12) >endfunc >*------------------------------------------------------------------------------- >function unicode_from(v) > return strconv(m.v, 10) >endfunc >*------------------------------------------------------------------------------- >