Вверх ↑
Ответов: 793
Рейтинг: 168
#1: 2023-04-24 15:23:29 ЛС | профиль | цитата
Пример как можно прочитать название полей, их тип и размер напрямую из файла DBF.
Add(MainForm,2953706,28,133)
{
link(onCreate,12483500:doExecute,[])
}
Add(MemoryStream,8725824,413,175)
{
Point(doPosition)
}
Add(FileStream,189724,140,147)
{
Point(doPosition)
link(onLoad,4521693:doEvent1,[])
}
Add(DataToFileEx,772172,560,245)
{
Type=3
DataSize=10
BigEndian=0
Point(Position)
Point(doPosition)
link(onGet,16462917:doValue,[])
link(Stream,6314117:Var2,[])
}
Add(ODialog,12483500,84,147)
{
Filter="dBase|*.dbf"
link(onExecute,189724:doOpen,[])
}
Add(Hub,4521693,189,147)
{
link(onEvent1,476097:doData,[])
link(onEvent2,1356853:doGet,[(214,160)(214,251)])
}
Add(DoData,476097,231,147)
{
Data=Integer(8)
link(onEventData,13559934:doWork3,[(277,153)])
}
Add(DataToFileEx,4017472,658,287)
{
Type=3
Point(Position)
Point(doPosition)
link(onGet,14732784:doMultiReplace,[])
link(Stream,11156953:Var2,[])
}
Add(DataToFileEx,15136235,749,336)
{
BigEndian=0
Point(Position)
Point(doPosition)
link(onGet,14148414:doString,[])
link(Stream,11156953:Var3,[(755,215)])
}
Add(Math,7889300,266,245)
{
OpType=1
Op2=32
ResultType=0
link(onResult,15747468:doFor,[])
}
Add(DataToFileEx,1356853,224,245)
{
DataSize=2
link(onGet,7889300:doOperation,[])
}
Add(StreamCopy,2156903,413,259)
{
Count=32
link(onCopy,611066:doEvent1,[])
link(Dest,6179572:Var2,[])
link(Source,189724:Stream,[(426,236)(146,236)])
}
Add(DoData,10164947,511,259)
{
Data=Integer(0)
link(onEventData,772172:doPosition,[])
}
Add(HubEx,13559934,273,133)
{
Angle=2
link(onEvent,189724:doPosition,[(130,139)(130,167)])
}
Add(For,15747468,315,245)
{
Start=32
Step=32
IncludeEnd=1
InData=0
link(onEvent,14982555:doEvent1,[])
}
Add(Hub,14982555,357,245)
{
OutCount=3
link(onEvent1,13559934:doWork2,[(382,251)(382,139)])
link(onEvent2,8725824:doClear,[(403,258)(403,188)])
link(onEvent3,2156903:doCopy,[])
}
Add(GetDataEx,6179572,413,210)
{
link(Data,8725824:Stream,[])
}
Add(DoData,14921833,609,301)
{
Data=Integer(11)
link(onEventData,4017472:doPosition,[])
}
Add(DoData,6097407,700,350)
{
Data=Integer(16)
link(onEventData,15136235:doPosition,[])
}
Add(StringTable,12465438,854,336)
{
Left=895
Top=425
Align=5
Columns=#10:Field name|10:Field type|12:Field length|
}
Add(FormatStr,14148414,805,336)
{
DataCount=3
Mask="%1;%2;%3"
link(onFString,12465438:doAdd,[])
link(Str1,16462917:Value,[])
link(Str2,11272687:Value,[])
}
Add(Memory,16462917,805,245)
{
}
Add(Memory,11272687,812,287)
{
}
Add(Hub,2384150,665,350)
{
link(onEvent1,6097407:doData,[])
link(onEvent2,15136235:doGet,[(690,363)(690,342)])
}
Add(Hub,611066,469,259)
{
OutCount=3
link(onEvent1,10164947:doData,[])
link(onEvent2,772172:doGet,[(494,272)(494,251)])
link(onEvent3,12847906:doEvent1,[(494,279)(494,307)])
}
Add(Hub,12847906,567,301)
{
OutCount=3
link(onEvent1,14921833:doData,[])
link(onEvent2,4017472:doGet,[(599,314)(599,293)])
link(onEvent3,2384150:doEvent1,[(599,321)(599,356)])
}
Add(GetDataEx,6314117,560,210)
{
Angle=3
link(Data,6179572:Var3,[])
}
Add(GetDataEx,11156953,658,210)
{
Angle=3
link(Data,6314117:Var3,[])
}
Add(MultiReplace,14732784,714,287)
{
ReplaceList="C=Character;\r\nD=Date;\r\nF=Floating point;\r\nL=Logical;\r\nM=Memo;\r\nN=Numeric;\r\n"
link(onResult,11272687:doValue,[])
}

карма: 16

0
Редактировалось 1 раз(а), последний 2023-04-24 16:00:50