zol писал(а):
к великому сожалению не работает (возникает ошибка -2147467259 ) даже в этой схеме. возможно, я не знаю всех нюансов данной SQL-версии.Note The Microsoft Jet database engine does not support the use of ALTER TABLE, or any of the data definition language (DDL) statements, with non-Microsoft Jet databases. Use the DAO Create methods instead.
Так что, только так. (Удалять таблицу, создавать заново, заполнять данными)
Add(MainForm,16194020,56,224)
{
link(onCreate,1084754:doString,[])
}
Add(StrList,1506974,280,196)
{
Strings=#23:SELECT * FROM PHONE.DBF|
}
Add(MTStrTbl,2217219,393,245)
{
Left=7
Top=47
Width=427
Height=285
Align=5
TabOrder=1
Name="MST"
Layout="lll"
DoubleBuffered=0
Point(doVisible)
Point(doBringToFront)
Point(doFont)
}
Add(MST_DB,10290878,337,245)
{
MSTControl="MST"
Point(doClearAll)
}
Add(Dir,5145339,112,189)
{
}
Add(FormatStr,1084754,112,238)
{
DataCount=1
Mask="Provider=Microsoft.Jet.OLEDB.4.0;\r\nData Source=%1;\r\nExtended Properties=dBASE IV;\r\nUser ID=Admin;Password=;\r\n\r\n"
link(onFString,9000139:doOpen,[])
link(Str1,5145339:CurrentDir,[])
}
Add(DS_OLEDB,9000139,161,238)
{
Name="MyDB"
Point(onError)
link(onCreate,531851:doEvent1,[])
}
Add(DSC_Query,15431247,280,245)
{
DSManager="MyDB"
link(onQuery,10290878:doAddRow,[])
link(onColumns,10290878:doAddCols,[])
link(SQL,1506974:Text,[])
}
Add(Hub,531851,210,238)
{
link(onEvent1,2944764:doEnum,[(235,244)(235,153)])
link(onEvent2,15431247:doQuery,[])
}
Add(DSC_Exec,9147106,329,147)
{
DSManager="MyDB"
}
Add(ArrayEnum,2944764,280,147)
{
link(onItem,9147106:doExec,[])
link(Array,10017277:Array,[])
}
Add(StrList,10017277,266,98)
{
Strings=#19:DROP TABLE [PHONE];|184:CREATE TABLE [PHONE] ([LASTNAME] VarChar(50),[NAME] VarChar(50),[PHONE] VarChar(12),[STREET] VarChar(50),[HOUSE] VarChar(4),[APP] VarChar(4),[NOTES] VarChar(100),[Email] VarChar(100));|97:INSERT INTO [PHONE] VALUES ('Potapov','Sergey','55-55-55','Mokhovaya','3','10','No comment',NOW);|91:INSERT INTO [PHONE] VALUES ('Popov','Andrey','56-56-56','Lenina','3','5','No comment',NOW);|96:INSERT INTO [PHONE] VALUES ('Ivanov','Ivan','17-17-17','SSadovaya','4','6','Very good man',NOW);|108:INSERT INTO [PHONE] VALUES ('Kazakov','Sergey','24-19-68','Polezhaeva','101','22','Also very good man',NOW);|0:|
}
Проверено на
- Windows 10 (x64)
- Hiasm v4.05 build 186 (delphi)