ATL Consumer Wizard Generated Classes for executing stored procedures 
Author Message
 ATL Consumer Wizard Generated Classes for executing stored procedures

Hi,

I'm having two problems with regard to ATL consumer wizard.

1. When I use the ATL consumer wizard it generates two classes for
each procedure. In each case that creates a connection too.

How can I use a single class for executing several SPs? (by having a
method in the class for each SP)

2. When accessing these classes in accessing them through VB (for
example) even if i have added the type library. I can only access the
ATL classes. (clesses with interfaces) but the other wizard generated
classes are not shown. How can I add the wizard generated classes to
the ATL class?

Please help me on this regard.

Thanks in advance.

Thilanga.



Sun, 07 Aug 2005 15:38:35 GMT  
 ATL Consumer Wizard Generated Classes for executing stored procedures
Don't know about 1, I've always hand-coded my ATL OLE DB code,
so this has never been a concern for me (I've never ever seen the
wizard).

As for 2, this behavior is by design. The ATL OLE DB Consumer classes
are simply C++ classes, so naturally invisible outside your project
(even to C++ clients of your server). You need to make them full
fledged COM objects for outside clients to see them. However, this
doesn't really make sense - expose COM objects and interfaces in
terms of functionality - not in terms of implementation...

--
=====================================
Alexander Nickolov
Microsoft MVP [VC], MCSD

MVP VC FAQ: http://www.mvps.org/vcfaq
=====================================

Quote:

> Hi,

> I'm having two problems with regard to ATL consumer wizard.

> 1. When I use the ATL consumer wizard it generates two classes for
> each procedure. In each case that creates a connection too.

> How can I use a single class for executing several SPs? (by having a
> method in the class for each SP)

> 2. When accessing these classes in accessing them through VB (for
> example) even if i have added the type library. I can only access the
> ATL classes. (clesses with interfaces) but the other wizard generated
> classes are not shown. How can I add the wizard generated classes to
> the ATL class?

> Please help me on this regard.

> Thanks in advance.

> Thilanga.



Mon, 08 Aug 2005 03:58:33 GMT  
 ATL Consumer Wizard Generated Classes for executing stored procedures
Thanks for your advice.

Now I sorted it out.

Thilanga.



Mon, 08 Aug 2005 17:57:44 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. ATL Consumer and Stored Procedures Params

2. ATL Consumer and Stored Procedures Params

3. Executing a Stored Procedure with ATL COM

4. Executing a Stored Procedure with ATL COM

5. Can't add new ATL class to ATL wizard generated solution

6. Error in classes generated with ATL Object Wizard

7. How to execute my stored procedure using visual C++

8. Unable to execute a sybase stored procedure with Commit and rollback statements

9. Executing stored procedure on sql server 2000 using c program

10. Executing a Stored Procedure.

11. Execute stored procedure using OLEDB

12. Executing Store procedures using an OLE Provider Connection String

 

 
Powered by phpBB® Forum Software