Главная страница
Top.Mail.Ru    Яндекс.Метрика
Текущий архив: 2005.10.02;
Скачать: CL | DM;

Вниз

Ошибка Rave Reports   Найти похожие ветки 

 
Фёдор Сумкин   (2005-09-14 10:10) [0]

Cоздаю отчет в Rave Reports в Delphi7. К базе
данных подсоединяюсь с помощью ADO. При запуске выдает ошибку:Unable to gain control of Rave Data Communication System. Нажимаю Retry- выполняется. Скажите, почему не работает с первого раза?


 
antoxa2005   (2005-09-14 12:10) [1]

Попробуй FastReport 3.x. Меня устраивает.


 
Igor_thief   (2005-09-14 16:16) [2]

QUESTION:
I am getting a "Unable to gain control of Rave Data Communication System" message. What should I do?
  OR
I need to run multiple instances of my application, each of which uses Rave. When I try and do this I get errors. What do I need to do to enable this to work?

ANSWER:
Direct DataViews are not designed to be thread safe. Therefore, if you are running multiple instances of an application using Direct Data Views when using Rave you are very likely to get error messages about gaining control of Rave. Your best solution for threading applications is to use [Driver DataViews], which are designed to be [threadsafe].

Solution to try if you must use Direct DataViews
The most likely reason errors are being generated is because the separate applications" Direct DataView groups are colliding. If you need to run multiple programs with separate reporting direct data view groups, set RPDefine.DataID to a unique value and the separate apps will not collide. Setting the DataID value needs to be done prior to executing any reports. It is recommended that you do this in the OnCreate event of your main form and use something that will be unique to the application.

Delphi Example:
procedure TForm1.FormCreate(Sender: TObject);
begin
 RPDefine.DataID := IntToStr(HInstance);
end;

C++Builder Example:
void __fastcall TForm1::FormCreate(TObject *Sender)
{
 Rpdefine::DataID = IntToStr(HInstance);  
}

Multiple Application Instances, Update

There have been a number of reports of problems when using the code provided above. First, it is critical that the DataID variable be set before any Rave connections have been created. Also, tests indicate that, for reasons not clear at this time, using the main form HInstance variable does not necessarily provide a value different for each instance of the application.

The currently recommended way of setting the DataID variable is to place the code in the project"s .DPR file and to use the application handle:

Delphi Example:
begin
 RPDefine.DataID := IntToStr(Application.Handle);
 Application.Initialize;
 {etc...}
end;

You will need to add RPDefine and Sysutils to the DPR file"s USES clause.



Страницы: 1 вся ветка

Текущий архив: 2005.10.02;
Скачать: CL | DM;

Наверх




Память: 0.47 MB
Время: 0.05 c
14-1126027956
Nous Mellon_
2005-09-06 21:32
2005.10.02
html-засада


1-1126183793
Толян
2005-09-08 16:49
2005.10.02
подсчет трафика


1-1126167880
Mister Twister
2005-09-08 12:24
2005.10.02
Структурированное хранилище


3-1124697763
Leonid
2005-08-22 12:02
2005.10.02
О файле PDOXUSRS.NET


1-1126549999
VadimX
2005-09-12 22:33
2005.10.02
RECV и TMemoryStream