473,378 Members | 1,422 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

use NET framwork in VB6?

I have a VB6 app that uses SQLServer2005 connection to store/retrieve data. I
want (I think) to get access to a(some) Server events. Seems this is doable
if
I can instantiate the SQLConnector Class and use some of it's methods in my
VB6 app. My question: can I use the NET framwork from within a VB6 app? If
yes, then where can I get info (book,tutorial,etc.) on how this is
accomplished.
Sorry, converting this app to NET is not possible for business reasons.
thanks,
jack
Aug 12 '07 #1
11 1348
You can write a Vb.net program that 'wraps' the framework functionality that
you want and exposes this functionality through 'COM' to your VB6 programs.
--
Terry
"hushtech" wrote:
I have a VB6 app that uses SQLServer2005 connection to store/retrieve data. I
want (I think) to get access to a(some) Server events. Seems this is doable
if
I can instantiate the SQLConnector Class and use some of it's methods in my
VB6 app. My question: can I use the NET framwork from within a VB6 app? If
yes, then where can I get info (book,tutorial,etc.) on how this is
accomplished.
Sorry, converting this app to NET is not possible for business reasons.
thanks,
jack
Aug 12 '07 #2
COM is your friend in this situation

Just write all the event logic in a COM capable dll , ( do not forget to
create a public sub new )
regards

Michel
"hushtech" <hu******@discussions.microsoft.comschreef in bericht
news:7E**********************************@microsof t.com...
>I have a VB6 app that uses SQLServer2005 connection to store/retrieve data.
I
want (I think) to get access to a(some) Server events. Seems this is
doable
if
I can instantiate the SQLConnector Class and use some of it's methods in
my
VB6 app. My question: can I use the NET framwork from within a VB6 app?
If
yes, then where can I get info (book,tutorial,etc.) on how this is
accomplished.
Sorry, converting this app to NET is not possible for business reasons.
thanks,
jack

Aug 12 '07 #3
Thanks Terry,
I've just installed VB 2005 so I can write a vb.net app (hopefully) with the
functionality I'm looking for. I infer from your comment "and exposes this
functionality through 'COM' to your VB6 programs" that there is some obvious
method for doing this in .net. I've heard of people doing this so there must
be a 'recipe'. If you can point to a tutorial that explains what goes on
I'd really
appreciate it.
regards, jack
"Terry" wrote:
You can write a Vb.net program that 'wraps' the framework functionality that
you want and exposes this functionality through 'COM' to your VB6 programs.
--
Terry
"hushtech" wrote:
I have a VB6 app that uses SQLServer2005 connection to store/retrieve data. I
want (I think) to get access to a(some) Server events. Seems this is doable
if
I can instantiate the SQLConnector Class and use some of it's methods in my
VB6 app. My question: can I use the NET framwork from within a VB6 app? If
yes, then where can I get info (book,tutorial,etc.) on how this is
accomplished.
Sorry, converting this app to NET is not possible for business reasons.
thanks,
jack
Aug 13 '07 #4
thanks Michel,
when you say "a COM capable dll" you mean one that 'wraps' the .NET stuff?
Like I mentioned to Terry, I've some inkling about doing this but never having
seen and instance I'll have to ferret around for some information that
explains
what needs to be done between the .NET and the COM. I've no problem with
COM dlls etc.
regards, jack

"Michel Posseth [MCP]" wrote:
COM is your friend in this situation

Just write all the event logic in a COM capable dll , ( do not forget to
create a public sub new )
regards

Michel
"hushtech" <hu******@discussions.microsoft.comschreef in bericht
news:7E**********************************@microsof t.com...
I have a VB6 app that uses SQLServer2005 connection to store/retrieve data.
I
want (I think) to get access to a(some) Server events. Seems this is
doable
if
I can instantiate the SQLConnector Class and use some of it's methods in
my
VB6 app. My question: can I use the NET framwork from within a VB6 app?
If
yes, then where can I get info (book,tutorial,etc.) on how this is
accomplished.
Sorry, converting this app to NET is not possible for business reasons.
thanks,
jack


Aug 13 '07 #5
here is an example i once posted in this newsgroup

http://groups.google.com/group/micro...996d74d250974e

Michel

"hushtech" <hu******@discussions.microsoft.comschreef in bericht
news:07**********************************@microsof t.com...
thanks Michel,
when you say "a COM capable dll" you mean one that 'wraps' the .NET stuff?
Like I mentioned to Terry, I've some inkling about doing this but never
having
seen and instance I'll have to ferret around for some information that
explains
what needs to be done between the .NET and the COM. I've no problem with
COM dlls etc.
regards, jack

"Michel Posseth [MCP]" wrote:
>COM is your friend in this situation

Just write all the event logic in a COM capable dll , ( do not forget to
create a public sub new )
regards

Michel
"hushtech" <hu******@discussions.microsoft.comschreef in bericht
news:7E**********************************@microso ft.com...
>I have a VB6 app that uses SQLServer2005 connection to store/retrieve
data.
I
want (I think) to get access to a(some) Server events. Seems this is
doable
if
I can instantiate the SQLConnector Class and use some of it's methods
in
my
VB6 app. My question: can I use the NET framwork from within a VB6
app?
If
yes, then where can I get info (book,tutorial,etc.) on how this is
accomplished.
Sorry, converting this app to NET is not possible for business reasons.
thanks,
jack



Aug 13 '07 #6
Hi Jack,
In addition to what Michel has provided, go into VS 2005 help, and using
the 'index' type in 'COM Interop'.
--
Terry
"hushtech" wrote:
Thanks Terry,
I've just installed VB 2005 so I can write a vb.net app (hopefully) with the
functionality I'm looking for. I infer from your comment "and exposes this
functionality through 'COM' to your VB6 programs" that there is some obvious
method for doing this in .net. I've heard of people doing this so there must
be a 'recipe'. If you can point to a tutorial that explains what goes on
I'd really
appreciate it.
regards, jack
"Terry" wrote:
You can write a Vb.net program that 'wraps' the framework functionality that
you want and exposes this functionality through 'COM' to your VB6 programs.
--
Terry
"hushtech" wrote:
I have a VB6 app that uses SQLServer2005 connection to store/retrieve data. I
want (I think) to get access to a(some) Server events. Seems this is doable
if
I can instantiate the SQLConnector Class and use some of it's methods in my
VB6 app. My question: can I use the NET framwork from within a VB6 app? If
yes, then where can I get info (book,tutorial,etc.) on how this is
accomplished.
Sorry, converting this app to NET is not possible for business reasons.
thanks,
jack
Aug 13 '07 #7
Hi here,

Since he is using VB.Net, he shall use the COM template at the VB.NET. It
saves a lot of trouble, such as GUID.

--
cheers,
RL
"Michel Posseth [MCP]" <MS**@posseth.comwrote in message
news:uC**************@TK2MSFTNGP06.phx.gbl...
here is an example i once posted in this newsgroup

http://groups.google.com/group/micro...996d74d250974e

Michel

"hushtech" <hu******@discussions.microsoft.comschreef in bericht
news:07**********************************@microsof t.com...
>thanks Michel,
when you say "a COM capable dll" you mean one that 'wraps' the .NET
stuff?
Like I mentioned to Terry, I've some inkling about doing this but never
having
seen and instance I'll have to ferret around for some information that
explains
what needs to be done between the .NET and the COM. I've no problem with
COM dlls etc.
regards, jack

"Michel Posseth [MCP]" wrote:
>>COM is your friend in this situation

Just write all the event logic in a COM capable dll , ( do not forget to
create a public sub new )
regards

Michel
"hushtech" <hu******@discussions.microsoft.comschreef in bericht
news:7E**********************************@micros oft.com...
I have a VB6 app that uses SQLServer2005 connection to store/retrieve
data.
I
want (I think) to get access to a(some) Server events. Seems this is
doable
if
I can instantiate the SQLConnector Class and use some of it's methods
in
my
VB6 app. My question: can I use the NET framwork from within a VB6
app?
If
yes, then where can I get info (book,tutorial,etc.) on how this is
accomplished.
Sorry, converting this app to NET is not possible for business
reasons.
thanks,
jack


Aug 13 '07 #8

Well i prefer to do everything myself :-)
saves a lot of trouble, such as GUID.
i also create my own guids ( and keep them ) so i can use early binding fore
every service release of the object without anny need of recompiling the
clients


"Egghead" <robertlo@NO_SHAW.CAschreef in bericht
news:%2****************@TK2MSFTNGP05.phx.gbl...
Hi here,

Since he is using VB.Net, he shall use the COM template at the VB.NET. It
saves a lot of trouble, such as GUID.

--
cheers,
RL
"Michel Posseth [MCP]" <MS**@posseth.comwrote in message
news:uC**************@TK2MSFTNGP06.phx.gbl...
>here is an example i once posted in this newsgroup

http://groups.google.com/group/micro...996d74d250974e

Michel

"hushtech" <hu******@discussions.microsoft.comschreef in bericht
news:07**********************************@microso ft.com...
>>thanks Michel,
when you say "a COM capable dll" you mean one that 'wraps' the .NET
stuff?
Like I mentioned to Terry, I've some inkling about doing this but never
having
seen and instance I'll have to ferret around for some information that
explains
what needs to be done between the .NET and the COM. I've no problem
with
COM dlls etc.
regards, jack

"Michel Posseth [MCP]" wrote:

COM is your friend in this situation

Just write all the event logic in a COM capable dll , ( do not forget
to
create a public sub new )
regards

Michel
"hushtech" <hu******@discussions.microsoft.comschreef in bericht
news:7E**********************************@micro soft.com...
I have a VB6 app that uses SQLServer2005 connection to store/retrieve
data.
I
want (I think) to get access to a(some) Server events. Seems this is
doable
if
I can instantiate the SQLConnector Class and use some of it's methods
in
my
VB6 app. My question: can I use the NET framwork from within a VB6
app?
If
yes, then where can I get info (book,tutorial,etc.) on how this is
accomplished.
Sorry, converting this app to NET is not possible for business
reasons.
thanks,
jack



Aug 13 '07 #9
Hi,

Actually, it is "fairly straight foward." Take a look here:

Tutorials: http://msdn2.microsoft.com/en-us/vbasic/bb466226.aspx

http://msdn2.microsoft.com/en-us/vbasic/aa701259.aspx

http://blogs.msdn.com/vbteam/archive...t-webcast.aspx

http://msdn2.microsoft.com/en-us/vbrun/default.aspx

--
Richard Grier, MVP
Hard & Software
Author of Visual Basic Programmer's Guide to Serial Communications, Fourth
Edition,
ISBN 1-890422-28-2 (391 pages, includes CD-ROM). July 2004, Revised March
2006.
See www.hardandsoftware.net for details and contact information.
Aug 13 '07 #10
Thanks Michel,
I'll study your example and see if I can make a COM dll from the .NET code.
Since
I've never even looked at NET code it should be 'fun'.
regards, jack

"Michel Posseth [MCP]" wrote:
here is an example i once posted in this newsgroup

http://groups.google.com/group/micro...996d74d250974e

Michel

"hushtech" <hu******@discussions.microsoft.comschreef in bericht
news:07**********************************@microsof t.com...
thanks Michel,
when you say "a COM capable dll" you mean one that 'wraps' the .NET stuff?
Like I mentioned to Terry, I've some inkling about doing this but never
having
seen and instance I'll have to ferret around for some information that
explains
what needs to be done between the .NET and the COM. I've no problem with
COM dlls etc.
regards, jack

"Michel Posseth [MCP]" wrote:
COM is your friend in this situation

Just write all the event logic in a COM capable dll , ( do not forget to
create a public sub new )
regards

Michel
"hushtech" <hu******@discussions.microsoft.comschreef in bericht
news:7E**********************************@microsof t.com...
I have a VB6 app that uses SQLServer2005 connection to store/retrieve
data.
I
want (I think) to get access to a(some) Server events. Seems this is
doable
if
I can instantiate the SQLConnector Class and use some of it's methods
in
my
VB6 app. My question: can I use the NET framwork from within a VB6
app?
If
yes, then where can I get info (book,tutorial,etc.) on how this is
accomplished.
Sorry, converting this app to NET is not possible for business reasons.
thanks,
jack


Aug 13 '07 #11
Egghead,
you suggest using the "COM template at the VB.NET". Where/what is the
"VB.NET"?
is it a discussion group, or a web site? I'm new to all NET places for
information.
Please give me directions to look at the "COM template".
regards, jack
"Egghead" wrote:
Hi here,

Since he is using VB.Net, he shall use the COM template at the VB.NET. It
saves a lot of trouble, such as GUID.

--
cheers,
RL
"Michel Posseth [MCP]" <MS**@posseth.comwrote in message
news:uC**************@TK2MSFTNGP06.phx.gbl...
here is an example i once posted in this newsgroup

http://groups.google.com/group/micro...996d74d250974e

Michel

"hushtech" <hu******@discussions.microsoft.comschreef in bericht
news:07**********************************@microsof t.com...
thanks Michel,
when you say "a COM capable dll" you mean one that 'wraps' the .NET
stuff?
Like I mentioned to Terry, I've some inkling about doing this but never
having
seen and instance I'll have to ferret around for some information that
explains
what needs to be done between the .NET and the COM. I've no problem with
COM dlls etc.
regards, jack

"Michel Posseth [MCP]" wrote:

COM is your friend in this situation

Just write all the event logic in a COM capable dll , ( do not forget to
create a public sub new )
regards

Michel
"hushtech" <hu******@discussions.microsoft.comschreef in bericht
news:7E**********************************@microso ft.com...
I have a VB6 app that uses SQLServer2005 connection to store/retrieve
data.
I
want (I think) to get access to a(some) Server events. Seems this is
doable
if
I can instantiate the SQLConnector Class and use some of it's methods
in
my
VB6 app. My question: can I use the NET framwork from within a VB6
app?
If
yes, then where can I get info (book,tutorial,etc.) on how this is
accomplished.
Sorry, converting this app to NET is not possible for business
reasons.
thanks,
jack


Aug 13 '07 #12

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Clark B | last post by:
How can I check which version of .NET framework user is running? Regards Clarkie
0
by: Ambroski | last post by:
I would like to know if I create an application in Application Development Framwork for 10g, will that be compatible with Oracle Db 9i and Oracle's 9i front-end tools? I suppose ADF has more...
2
by: Don Wash | last post by:
Hi All! I'm new to .NET and I've made a few searches on the net and finally found that the key to understand Microsoft .NET development process is to understand Microsoft .NET Framework classes...
2
by: sunrat | last post by:
After installing .NET Framework SP1, I find that re-compiling Visual C++.NET code with Visual Studio 2003 (v 7.1.3088) that previously compiled successfully gives rise to two errors: C2039:...
2
by: Chad Crowder | last post by:
Hi all, I've got a problem on one of my production systems in that it is using the 1.034 version of the framework by default, even though v1.1 is installed. I tried simply pointing to the new...
4
by: Mulm3h | last post by:
Hi Is there a way to run a windows application created in VB 2005 express on other computers which have no .NET framwork installed on them? Regards MulM3h
2
by: jadavmanoj | last post by:
what is Framwork? How many web framwork and stand alone Framwork?
2
by: chandan | last post by:
I had created a deployment project using ASP.net 2.0 . I have to intall Ajax and .net framwork before installing my web set up. Is there any way to install these setup inside my websetup?? ...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.