Не могу разобраться с базами данных. Взял пример из справки [spoiler=] Add(EntryPoint,2953706,567,196) { Width=435 Height=442 Text="MySql access" Point(doText) } Add(Button,4603873,84,154) { Left=10 Top=140 Width=70 Text="Read DB" Point(onClick) link(onClick,780636:doEvent1,[]) AddHint(-74,6,59,13,Text) } Add(ConnectionState,680685,357,210) { ConnectionState=2 } Add(If_else,14873477,357,259) { link(onTrue,3519827:doEvent1,[]) link(Op1,680685:ConnectionState,[]) } Add(Hub,1657405,322,252) { link(onEvent1,11922358:doWork2,[(345,258)(345,202)]) link(onEvent2,14873477:doCompare,[]) } Add(Button,13945932,84,259) { Left=10 Top=170 Width=70 Text="Close DB" Point(onClick) link(onClick,4239113:doClose,[]) AddHint(-76,6,59,13,Text) } Add(StateChangeEventArgs,3070861,280,252) { link(onCurrentState,1657405:doEvent1,[]) } Add(DoData,3385822,154,112) { link(onEventData,8111209:doServer,[]) link(Data,4322410:Text,[]) } Add(TextBox,5493934,238,70) { Left=85 Top=35 Width=330 Text="DataBaseName" Anchor=13 Lines=[] Point(doText) Point(Text) AddHint(-21,-26,90,13,Text) } Add(TextBox,4322410,154,70) { Left=85 Top=10 Width=330 Text="127.0.0.1" Anchor=13 Lines=[] Point(doText) Point(Text) AddHint(-28,-27,60,13,Text) } Add(Hub,780636,126,154) { OutCount=6 link(onEvent1,3385822:doData,[(147,160)(147,118)]) link(onEvent2,4699690:doData,[(225,167)(225,125)]) link(onEvent3,10076942:doData,[(300,174)(300,132)]) link(onEvent4,15195386:doData,[(380,181)(380,139)]) link(onEvent5,4239113:doConnectionStr,[(189,188)(189,272)]) link(onEvent6,4239113:doOpen,[(180,195)(180,258)]) } Add(Label,5873414,196,70) { Left=10 Top=37 Width=70 Height=18 Text="DataBase:" TextAlign=1 Point(doText) Point(onClick) } Add(Label,8565674,280,70) { Left=10 Top=13 Width=70 Height=18 Text="Server:" TextAlign=1 Point(doText) Point(onClick) } Add(TextBox,7235866,322,70) { Left=85 Top=60 Width=330 Text="User" Anchor=13 Lines=[] Point(doText) Point(Text) AddHint(1,-25,37,13,Text) } Add(Label,3503562,364,70) { Left=10 Top=63 Width=70 Height=18 Text="UserID:" TextAlign=1 Point(doText) Point(onClick) } Add(DataGridView,10949420,511,294) { Left=85 Top=140 Width=330 Height=255 Anchor=15 Columns=[] Point(doDataSource) Point(onDataError) link(onDataError,11922358:doWork3,[(557,300)]) } Add(DataSet,13726690,448,210) { Point(DataSet) Point(Tables) } Add(Hub,3519827,406,259) { OutCount=3 link(onEvent1,1575172:doConstructor3,[]) link(onEvent2,1575172:doFill,[]) link(onEvent3,12090539:doForEach,[(427,279)(427,300)]) } Add(ForEach,12090539,469,294) { link(onItem,10949420:doDataSource,[]) link(obj,13726690:Tables,[(475,250)(461,250)]) } Add(HubEx,11922358,553,196) { link(onEvent,2953706:doText,[]) } Add(AssemblyInfo,6093630,567,238) { Platform=1 References="C:\HiAsm\Elements\CNET\Example\DataBase\mysql\MySql.Data.dll\r\n" } Add(MySqlConnection,4239113,238,252) { Point(doOpen) Point(ConnectionString) Point(doClose) Point(doConnectionStr) link(onStateChange,3070861:doGetMethod,[]) link(ConnectionStr,8111209:ConnectionString,[(244,198)(468,198)]) } Add(MySqlDataAdapter,1575172,434,259) { Point(doConstructor3) Point(doFill) Point(selectCommandText) Point(selectConnection) Point(dataSet) link(selectCommandText,4115894:Text,[(440,206)(496,206)]) link(selectConnection,4239113:MySqlConnection,[(447,247)(398,247)(398,298)(244,298)]) link(dataSet,13726690:DataSet,[]) } Add(MySqlConnectionStringBuilder,8111209,455,112) { Point(ConnectionString) Point(doServer) Point(doDatabase) Point(doUserID) Point(doPassword) } Add(TextBox,13472459,406,70) { Left=85 Top=85 Width=330 Text="password" Anchor=13 Lines=[] PasswordChar="*" Point(doText) Point(Text) AddHint(-11,-25,60,13,Text) } Add(Label,3714127,448,70) { Left=10 Top=88 Width=70 Height=18 Text="Password:" TextAlign=1 Point(doText) Point(onClick) } Add(TextBox,4115894,490,70) { Left=85 Top=110 Width=330 Text="select * from TableName" Anchor=13 Lines=[] Point(doText) Point(Text) AddHint(-23,-25,131,13,Text) } Add(Label,1568222,532,70) { Left=10 Top=113 Width=70 Height=18 Text="Query:" TextAlign=1 Point(doText) Point(onClick) } Add(DoData,4699690,238,119) { link(onEventData,8111209:doDatabase,[]) link(Data,5493934:Text,[]) } Add(DoData,10076942,322,126) { link(onEventData,8111209:doUserID,[]) link(Data,7235866:Text,[]) } Add(DoData,15195386,406,133) { link(onEventData,8111209:doPassword,[]) link(Data,13472459:Text,[]) }
][/spoiler]Запускаю и получаю Пробую свой пример [spoiler= [/spoiler]И получаю ошибку [spoiler=] [/spoiler]Как быть? Что не так? Редактировалось 1 раз(а), последний 2022-01-13 13:43:12
|