I
I
Ivan Melnikov2019-03-10 20:48:32
1C-Enterprise
Ivan Melnikov, 2019-03-10 20:48:32

How to make a COM connection to another 1C 8.3 file base from an empty 1C 8.3 infobase?

Everywhere they write about the standard function:

Функция ПолучитьПодключениеКФайловойБД()
    Параметры = "File=""C:\1CBase""";Usr=""login"";Pwd=""password"";";
    V83COMConnector= Новый COMОбъект("V83.COMConnector");
    Попытка
        Возврат V82COMConnector.Connect(Параметры);
    Исключение
        Предупреждение ("Ошибка подключения!");
        Возврат Неопределено;
    КонецПопытки;
КонецФункции;

But not a word about in which module this function should be written and from which module it should be called later...

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry Kinash, 2019-03-11
@immelnikoff

A COM connection from base to base is made to receive or transfer information. You will not transmit or receive information telepathically, but with the help of processing or an algorithm on some of the forms. Therefore:
1) if there is one connection point, then the procedure is not needed - copy its filling and paste it into the place where it is needed this connection
2) if there are several points (for example, connections to several databases or separate algorithms for transferring orders and payments ), then copy this procedure to the module where the exchange algorithm is described - a processing module or a form module
3) if you have several processing or exchange forms, you can create a common module and throw the procedure into it.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question