Solved

VB6 COM Sample Code Needed

Posted on 2006-11-16
2
376 Views
Last Modified: 2013-11-25
I need to use a legacy OLE data provider that was designed to work with VB6.  We have done some testing and the OLE provider will not work reliably with the .Net tools.

The plan is to write class object of some sort in VB6 that will execute the legacy provider and return data back to a VB.Net web service.  The web service will then respond client requests for the data.

I have written a number of Windows applications using VB6, but I haven't tried to write a class library using VB6.  Also as I understand it, the class will have to be a COM object in order for it to be used by VB.Net.

Can anyone tell me if I have to create a COM object to make this work?

Can anyone provide me with VB6 sample code that can be used as a starting point for this effort?

Bob
0
Comment
Question by:bobsegrest
2 Comments
 
LVL 5

Accepted Solution

by:
Julian_K earned 400 total points
ID: 17963299
Hello.

All classes in VB6 are using COM technology, so you don't have any options - the class WILL BE a COM object.

You can start with creating a new project in VB6, and setting its type to "ActiveX EXE" or "ActiveX DLL". Then define several public accessible classes and several public properties/functions/procedures.

I could assist further with some tests/implementations/answers, but your question is too general at this time for me to help more.

Regards,
Julian.
0
 
LVL 8

Assisted Solution

by:kaliyugkaarjun
kaliyugkaarjun earned 100 total points
ID: 17963834
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…

861 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now