Access Violation about IDAPI32.DLL |
尚未結案
|
marker
一般會員 ![]() ![]() 發表:9 回覆:5 積分:2 註冊:2004-11-05 發送簡訊給我 |
Hi all, I have an application which have an main form (inherit from TForm) A, another form B (also inherit from TForm) where B contains a dataform C (also inherit from TForm). B will be exist during the program life cycle where C will be created and destroyed when different function is loaded. I have encounter a bug when I open and close from C rapidly without any operation. The error look like "Access violation at address 4BDExxxx in module 'IDAPI32.DLL'. Read of address xxxxxxxx." Is anyone met this error before? How to fix it? Thanks for any help. Mark Leung
|
scotthsiao
高階會員 ![]() ![]() ![]() ![]() 發表:13 回覆:324 積分:147 註冊:2005-02-01 發送簡訊給我 |
|
marker
一般會員 ![]() ![]() 發表:9 回覆:5 積分:2 註冊:2004-11-05 發送簡訊給我 |
scotthsiao, I know what is your meaning, but form C is actually a place holder for different function. It will lead to memory leakage if I keep them all. I just found that the ordering of the construction of form C may help to fix the error (I hope). And the ordering sequence is as follows in 2 versions (Ver.A is older version). Ver A: 1. create form C
2. disable controls
3. get data from DB
4. enable controls
5. merge form C into form B
6. ShowModal B Ver B: 1. create form C
2. merge form C into form B
3. disable controls
4. get data from DB
5. enable controls
6. ShowModal B Dooes anyone know why Ver B help? Mark Leung
|
scotthsiao
高階會員 ![]() ![]() ![]() ![]() 發表:13 回覆:324 積分:147 註冊:2005-02-01 發送簡訊給我 |
Sorry, I can not understand what difference from ver A and B.
If you do want to fix the problem, just put a datamodule form individual. Place all the data component in the form.
Other forms can use the datamodule to open or close the query or table.
|
本站聲明 |
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。 2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。 3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇! |