Answer the question
In order to leave comments, you need to log in
Has anyone come across Sh4Ole?
We adjusted the Sh4Ole ActiveX library to read StoreHouse4 data.
There were 2 questions:
1) What generally ideology of requests? It doesn't look like SQL at all, it feels like I plunged headlong into the times of Win2000. One language in which it's all written, what is it worth. I understand that at that time WinForms generally looked terrible compared to Delphi, but still ...
2) I understand correctly that there are 2 equivalent ways to get data:
- calling functions like List of invoices
function DocList( DateFrom, // начало периода
DateTo: double; // окончание периода
SysFlag, // 0- учет 1 - спец учет
Get_Active, // <>0 - Показывать активные док-ты, 0 - нет
Get_Non_Active, // <>0 - Показывать неактивные документы, 0 - нет
Get_Sum: integer):integer; safecall; // <>0 - Показывать суммы, 0 - нет
IndQuery := sh.pr_CreateProc( 'GoodsTree' ) ;
sh.pr_SetValByName ( IndQuery, 0, '209.2.0', NULL);
sh.pr_Post( IndQuery,0 );
sh.pr_ExecuteProc(IndQuery); // Получаю полное дерево товарных групп
sh.pr_AddIndex(IndQuery,1,'I_Rid','209.1.0'); // Создаю индекс I_RID по полю '209.1.0' датасета 1
sh.pr_AddIndex(IndQuery,1,'I_NAME','209.3.0'); // Создаю индекс I_NAME по полю '209.3.0' датасета 1 ( в примере не используется )
sh.pr_SetIndexName(IndQuery,1,'I_Rid'); // Назначаю датасету 1 индекс I_RID Буду искать по риду
if sh.pr_FindKey(IndQuery,1,28,NULL,NULL) = 1 then //Позиционирование на записи с ридом 28
ShowMessage(sh.pr_ValByName(IndQuery,1,'209.3.0')+ ' '+ sh.pr_ValByName(IndQuery,1,'209.4.0'))
else Showmessage('Not Found');
if sh.pr_FindKey(IndQuery,1,30,NULL,NULL) = 1 then //Позиционирование на запись с ридом 30
ShowMessage(sh.pr_ValByName(IndQuery,1,'209.3.0')+ ' '+ sh.pr_ValByName(IndQuery,1,'209.4.0'))
else Showmessage('Not Found');
sh.pr_CloseProc(IndQuery);
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question