Problem losing reference to class with 3 tiered app?? 
Author Message
 Problem losing reference to class with 3 tiered app??

I am having a  weird problem with losing a reference to a class in a DLL
(The DLL is a part of my Project Group). Every time I open the project for
editing I get a compiler error that says: "User variable not defined".

When I check the "References", the ActiveX DLL (MyDLL) is referenced OK.
Now if I de-reference my MyDLL save the project then re-reference MyDLL it
recognizes the class and runs the project with no problem.

Does anyone have any idea on what the deal with this is??



Sat, 08 Sep 2001 03:00:00 GMT  
 Problem losing reference to class with 3 tiered app??
I presume there's no re-compilation of your DLL anywhere along the way? If
so the CLSID information could be getting muddled hence the need to
re-reference the ActiveX DLL. Only a guess.

Best regards,

Mike

Quote:

>I am having a  weird problem with losing a reference to a class in a DLL
>(The DLL is a part of my Project Group). Every time I open the project for
>editing I get a compiler error that says: "User variable not defined".

>When I check the "References", the ActiveX DLL (MyDLL) is referenced OK.
>Now if I de-reference my MyDLL save the project then re-reference MyDLL it
>recognizes the class and runs the project with no problem.

>Does anyone have any idea on what the deal with this is??



Sun, 09 Sep 2001 03:00:00 GMT  
 Problem losing reference to class with 3 tiered app??
Yes, but it's a DLL project within my Main project not a registered DLL in
my system directory.
Quote:

>I presume there's no re-compilation of your DLL anywhere along the way? If
>so the CLSID information could be getting muddled hence the need to
>re-reference the ActiveX DLL. Only a guess.

>Best regards,

>Mike


>>I am having a  weird problem with losing a reference to a class in a DLL
>>(The DLL is a part of my Project Group). Every time I open the project for
>>editing I get a compiler error that says: "User variable not defined".

>>When I check the "References", the ActiveX DLL (MyDLL) is referenced OK.
>>Now if I de-reference my MyDLL save the project then re-reference MyDLL it
>>recognizes the class and runs the project with no problem.

>>Does anyone have any idea on what the deal with this is??



Sun, 09 Sep 2001 03:00:00 GMT  
 Problem losing reference to class with 3 tiered app??
It is a bug with VB6 that causes this issue...     I have not been
able to determine exactly the order in which this bug becomes apparent
but it is indeed a bug to do with project groups.   If you save a
project group, exit VB and come back into it, you will sometimes get
this problem...  If you start VB, and add the projects into the
environment one at a time this issue does not occur...  

I hope this helps,

Mark Heys, MSCD/MCSE

Quote:

>Yes, but it's a DLL project within my Main project not a registered DLL in
>my system directory.


>>I presume there's no re-compilation of your DLL anywhere along the way? If
>>so the CLSID information could be getting muddled hence the need to
>>re-reference the ActiveX DLL. Only a guess.

>>Best regards,

>>Mike


>>>I am having a  weird problem with losing a reference to a class in a DLL
>>>(The DLL is a part of my Project Group). Every time I open the project for
>>>editing I get a compiler error that says: "User variable not defined".

>>>When I check the "References", the ActiveX DLL (MyDLL) is referenced OK.
>>>Now if I de-reference my MyDLL save the project then re-reference MyDLL it
>>>recognizes the class and runs the project with no problem.

>>>Does anyone have any idea on what the deal with this is??



Mon, 10 Sep 2001 03:00:00 GMT  
 Problem losing reference to class with 3 tiered app??
THANKS, I knew I wasn't crazy.
Is this on the list of fixes for the next VB6 Service Pack??

Quote:

>It is a bug with VB6 that causes this issue...     I have not been
>able to determine exactly the order in which this bug becomes apparent
>but it is indeed a bug to do with project groups.   If you save a
>project group, exit VB and come back into it, you will sometimes get
>this problem...  If you start VB, and add the projects into the
>environment one at a time this issue does not occur...

>I hope this helps,

>Mark Heys, MSCD/MCSE


>>Yes, but it's a DLL project within my Main project not a registered DLL in
>>my system directory.


>>>I presume there's no re-compilation of your DLL anywhere along the way?
If
>>>so the CLSID information could be getting muddled hence the need to
>>>re-reference the ActiveX DLL. Only a guess.

>>>Best regards,

>>>Mike




- Show quoted text -

Quote:
>>>>I am having a  weird problem with losing a reference to a class in a DLL
>>>>(The DLL is a part of my Project Group). Every time I open the project
for
>>>>editing I get a compiler error that says: "User variable not defined".

>>>>When I check the "References", the ActiveX DLL (MyDLL) is referenced OK.
>>>>Now if I de-reference my MyDLL save the project then re-reference MyDLL
it
>>>>recognizes the class and runs the project with no problem.

>>>>Does anyone have any idea on what the deal with this is??



Mon, 10 Sep 2001 03:00:00 GMT  
 Problem losing reference to class with 3 tiered app??
I had this exact problem a while ago.

In your dll project select Project ->  <project name> properties, then the
Component tab.  Make sure "project compatibility" is checked, and then enter
the path to your compiled dll file in the text box.  This ensures that a new
class id is not created in the registry when you recompile the dll.

This solved my problem for good.  Hope it solves yours.  Good luck.

Quote:

>I am having a  weird problem with losing a reference to a class in a DLL
>(The DLL is a part of my Project Group). Every time I open the project for
>editing I get a compiler error that says: "User variable not defined".

>When I check the "References", the ActiveX DLL (MyDLL) is referenced OK.
>Now if I de-reference my MyDLL save the project then re-reference MyDLL it
>recognizes the class and runs the project with no problem.

>Does anyone have any idea on what the deal with this is??



Sun, 16 Sep 2001 03:00:00 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. Problem losing reference to class with 3 tiered app??

2. VB App as Service with 3 Tiered approach problem

3. VB App as Service with 3 Tiered approach problem

4. VB App as Service with 3 Tiered approach problem

5. multi-tiered app

6. Security issue in mulit tiered DCOM app

7. Problem: VB5 MDI App Losing Focus

8. Strange VB4 OLE Server Problem - App loses Focus?

9. Problem using a three tiered architecture with a data grid

10. Problem using a three tiered architecture with a data grid

11. Custom Classes and Collections : Referencing Problem

12. Three-tiered run-time problems

 

 
Powered by phpBB® Forum Software