Solved

VB6 COM Sample Code Needed

Posted on 2006-11-16
2
389 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

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

Entering time in Microsoft Access can be difficult. An input mask often bothers users more than helping them and won't catch all typing errors. This article shows how to create a textbox for 24-hour time input with full validation politely catching …
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
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 lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

724 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