Tad, Я пока оставил так: Add(MainForm,2953706,14,266) { Width=1272 Height=550 Point(onClose) link(onCreate,8134644:doStrCat,[]) link(onClose,3682550:doEvent,[(61,293)(61,342)]) } Add(DS_SQLite,9154515,315,273) { Name="db1" Point(onError) link(onOpen,12839521:doString,[]) link(FileName,8134644:Result,[(321,264)(258,264)(258,320)(76,320)]) link(onError,16148190:doWork,[(359,286)(359,321)]) } Add(Dir,1723842,70,231) { } Add(StrCat,8134644,70,280) { Str2="Customer.db" link(onStrCat,11789700:doFileExists,[]) link(Str1,1723842:CurrentDir,[]) } Add(LineBreakEx,16148190,371,315) { Caption="Error" } Add(VisualStrings,9988527,119,147) { @Hint=#17:Имя базы клеентов| Lines=#11:Customer.db| Width=74 AddHint(-5,-25,116,13,@Hint) } Add(FileTools,11789700,119,259) { link(onEnd,15633069:doEvent1,[]) link(FileName,9988527:Text,[]) link(NewFileName,13920293:Text,[]) } Add(IndexToChanel,15343565,203,266) { Point(Index) link(onEvent2,13032493:doEvent1,[]) link(Index,5687095:Var2,[]) } Add(Memory,7991647,203,203) { } Add(Hub,15633069,168,259) { link(onEvent1,7991647:doValue,[(192,265)(192,209)]) link(onEvent2,15343565:doEvent,[]) } Add(IndexToChanel,3682550,238,336) { Point(Index) link(onEvent2,9154515:doClose,[(298,349)(298,286)]) link(Index,5687095:Var3,[(244,250)]) } Add(GetDataEx,5687095,203,245) { link(Data,7991647:Value,[]) } Add(LineBreakEx,7090998,420,147) { Caption="Error" Type=1 link(OnEvent,13069546:doMessage,[]) } Add(Message,13069546,476,147) { Caption="Error" } Add(DSC_Query,10510355,469,273) { DSManager="db1" link(onQuery,12302515:doStr,[]) link(onError,5223325:doWork,[(509,293)(509,321)]) } Add(FormatStr,12839521,371,273) { DataCount=1 Mask="pragma table_info(%1);" Point(FString) link(onFString,418486:doCharset,[]) link(Str1,7371429:Text,[]) } Add(LineBreakEx,5223325,525,315) { Caption="Error" } Add(Charset,418486,420,273) { Type=6 link(onCharset,10510355:doQuery,[]) } Add(MT_String,12302515,525,273) { Delimeter="\9" link(onResult,6648628:doCharset,[]) } Add(Charset,6648628,574,273) { Type=7 link(onCharset,13468017:doEvent1,[]) } Add(VisualStrings,9449102,490,595) { @Hint=#11:Имя таблицы| Lines=#17:Juridical_persons| Width=88 } Add(VisualStrings,16740710,490,497) { @Hint=#11:Имя таблицы| Lines=#22:individual_businessman| Width=116 } Add(VisualStrings,7371429,371,231) { @Hint=#11:Имя таблицы| Lines=#16:physical_persons| Width=88 } Add(Memo,12449006,812,238) { Top=25 Width=405 Height=239 ScrollBars=2 } Add(Hub,13032493,266,273) { link(onEvent1,9154515:doOpen,[]) link(onEvent2,12808121:doEvent,[(291,286)(291,342)]) } Add(VisualStrings,13920293,126,175) { @Hint=#17:Имя базы клеентов| Lines=#15:Customer.db.tmp| Width=95 } Add(Check,371069,805,336) { link(onEvent,14400780:doEvent1,[]) } Add(MultiStrData,15261095,658,280) { Char="\9" link(onPart2,7562039:doCompare,[]) } Add(If_else,7562039,707,287) { Op2=String(nom_dog) link(onTrue,4841836:doOn,[]) } Add(Switch,4841836,756,273) { DataOn=Integer(1) DataOff=Integer(0) Point(doOn) Point(State) } Add(IndexToChanel,12808121,756,336) { Point(Index) link(onEvent1,371069:doWork,[]) link(Index,4841836:State,[]) } Add(Hub,14400780,875,336) { OutCount=6 link(onEvent1,11789700:doCopy,[(894,342)(894,104)(109,104)(109,272)]) link(onEvent2,11487427:doQuery,[]) link(onEvent3,13242632:doQuery,[(942,356)(942,391)]) link(onEvent4,2982143:doQuery,[(935,363)(935,433)]) link(onEvent5,719392:doExec,[(928,370)(928,475)]) link(onEvent6,16443863:doEvent1,[(900,377)(900,398)(383,398)(383,454)]) } Add(DSC_Query,11487427,952,343) { SQL="ALTER TABLE physical_persons ADD column nom_dog char;" DSManager="db1" link(onError,12290538:doWork,[]) } Add(LineBreakEx,12290538,1001,357) { Caption="Error" } Add(Memo,9552018,756,448) { Top=269 Width=405 Height=235 ScrollBars=2 } Add(DSC_Query,14997235,574,448) { DSManager="db1" link(onQuery,9803752:doWork2,[]) link(onColumns,9803752:doWork3,[(620,461)]) link(onError,13516536:doWork,[(614,468)(614,496)]) } Add(FormatStr,12179563,476,448) { DataCount=1 Mask="pragma table_info(%1);" Point(FString) link(onFString,8645564:doCharset,[]) link(Str1,5054364:Text,[]) } Add(LineBreakEx,13516536,637,490) { Caption="Error" } Add(Charset,8645564,525,448) { Type=6 link(onCharset,14997235:doQuery,[]) } Add(MT_String,7387046,637,448) { Delimeter="\9" link(onResult,13423965:doCharset,[]) } Add(VisualStrings,5054364,476,406) { @Hint=#11:Имя таблицы| Lines=#16:physical_persons| Width=88 } Add(Charset,13423965,693,448) { Type=7 link(onCharset,9552018:doAdd,[]) } Add(HubEx,9803752,616,448) { link(onEvent,7387046:doStr,[]) } Add(Hub,13468017,623,273) { link(onEvent1,12449006:doAdd,[(648,279)(648,244)]) link(onEvent2,15261095:doSplit,[]) } Add(DSC_Query,13242632,952,385) { SQL="ALTER TABLE individual_businessman ADD column nom_dog TEXT;" DSManager="db1" link(onError,144238:doWork,[]) } Add(LineBreakEx,144238,1001,399) { Caption="Error" } Add(DSC_Query,2982143,952,427) { SQL="ALTER TABLE Juridical_persons ADD column nom_dog TEXT;" DSManager="db1" link(onError,5471415:doWork,[]) } Add(LineBreakEx,5471415,1001,441) { Caption="Error" } Add(LineBreakEx,12893770,1001,476) { Caption="Error" } Add(Memo,10035609,773,638) { Left=420 Top=34 Width=405 Height=470 ScrollBars=2 } Add(Memo,10546872,766,539) { Left=840 Top=34 Width=405 Height=470 ScrollBars=2 } Add(DSC_Query,15691860,588,539) { DSManager="db1" link(onQuery,89880:doWork2,[]) link(onColumns,89880:doWork3,[(634,552)]) link(onError,8455648:doWork,[(628,559)(628,587)]) } Add(FormatStr,15862723,490,539) { DataCount=1 Mask="pragma table_info(%1);" Point(FString) link(onFString,11758901:doCharset,[]) link(Str1,16740710:Text,[]) } Add(LineBreakEx,8455648,651,581) { Caption="Error" } Add(Charset,11758901,539,539) { Type=6 link(onCharset,15691860:doQuery,[]) } Add(MT_String,4856244,651,539) { Delimeter="\9" link(onResult,6950737:doCharset,[]) } Add(Charset,6950737,707,539) { Type=7 link(onCharset,10546872:doAdd,[]) } Add(HubEx,89880,630,539) { link(onEvent,4856244:doStr,[]) } Add(DSC_Query,5525628,588,637) { DSManager="db1" link(onQuery,15721547:doWork2,[]) link(onColumns,15721547:doWork3,[(634,650)]) link(onError,5555360:doWork,[(628,657)(628,685)]) } Add(FormatStr,11994119,490,637) { DataCount=1 Mask="pragma table_info(%1);" Point(FString) link(onFString,6836753:doCharset,[]) link(Str1,9449102:Text,[]) } Add(LineBreakEx,5555360,651,679) { Caption="Error" } Add(Charset,6836753,539,637) { Type=6 link(onCharset,5525628:doQuery,[]) } Add(MT_String,13097353,651,637) { Delimeter="\9" link(onResult,15557689:doCharset,[]) } Add(Charset,15557689,707,637) { Type=7 link(onCharset,10035609:doAdd,[]) } Add(HubEx,15721547,630,637) { link(onEvent,13097353:doStr,[]) } Add(Hub,16443863,420,448) { OutCount=3 link(onEvent1,12179563:doString,[]) link(onEvent2,15862723:doString,[(466,461)(466,545)]) link(onEvent3,11994119:doString,[(459,468)(459,643)]) } Add(Label,7958425,497,7) { Left=845 Top=5 Width=150 Caption="individual_businessman" } Add(Label,2174582,562,14) { Left=435 Top=5 Width=115 Height=17 Caption="Juridical_persons" } Add(Label,8774446,632,28) { Left=10 Top=5 Width=115 Height=17 Caption="physical_persons" } Add(DSC_Exec,719392,952,469) { SQL="VACUUM;" DSManager="db1" link(onError,12893770:doWork,[]) }
Попробовал на опытной базе, вроде бы все нормально. Но за предложенный вариант всё рвкно спасибо. Всё пригодится Редактировалось 1 раз(а), последний 2017-01-06 18:20:27
|