Problems calling VB Components from ASP using Interfaces Classes 
Author Message
 Problems calling VB Components from ASP using Interfaces Classes

Hi There,

I've created a component using VB 6.0 using Interface classes and Implementation
classes. The Interface Classes are used to expose public methods to the client,
while the Implementation classes implement the Interface using the command:

    Implements IDataUtility

This has been done so that the Client can access the Public Methods using the
Interface.

    The Interface Class is Called IDataUtility
    The Implementation Class is Called CDataUtility

    The Method in Question is called - ExecuteSQL

When using ASP which class do I call ??

When Trying create/Access the Object using the following

    Set lobjSQL = Server.CreateObject("DCDatabaseAccess.IDataUtility")
    if not lobjSQL.ExecuteSQL(lrstRecordSet,txtSQL.text) then exit sub

The code will only execute the Interface Function and not it's implementation
If if try to execute the Implementation function using the following code

    Set lobjSQL = Server.CreateObject("DCDatabaseAccess.IDataUtility")
    if not lobjSQL.IDataUtility_ExecuteSQL(lrstRecordSet,txtSQL.text) then exit

I get the Error Object doesn't support this property or method.

Is there any way around this problem. The code works perfectly when testing it
from a VB project using Early Binding.

The obvious solution would be to get rid of the interfaces and Change all the
private methods in the Implementation class to Public where required. I was
hoping it won't come to that.

Any help would be greatly appreciated.

Viren



Tue, 10 Jun 2003 07:22:07 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Problems executing ASP components using VB Interfaces

2. Problem using an Array in ASP as argument to a VB component

3. Have a problem with using component writed by VB in ASP

4. Accessing VB component interfaces from ASP script?

5. Accessing VB component interfaces from ASP script?

6. Calling an ASP page (http) using a COM component

7. ASP page using VB-Com component that uses ADO

8. Intellisense in ASP does not present properties of classes contained in a VB component (2nd post)

9. Intellisense in ASP does not present properties of classes contained in a VB component

10. problems in calling component in ASP

11. Problems calling a MTS component from ASP

12. Problems calling a MTS component from ASP

 

 
Powered by phpBB® Forum Software