I am working with a system using a Com+ layer built in VB6. I am now trying to use these components from VB.Net.
I have added the component as reference and .Net seem to communicate with the component.
I am using the following code to connect:
[code=vbnet]
Dim adm_event As Admin.Event
adm_event = CreateObject("a dmin.event")
[/code]
While running the procedure I get the error:
ErrorCode=-2147467259
Message="[DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied."
Source="Microso ft OLE DB Provider for SQL Server"
The connection string is stored in Global,asa as well as a few other parameters.
[code=vbnet]
Set objContext = GetObjectContex t()
connstring = objContext.Item ("Application") ("connstring ")
[/code]
I think it's this part that doesn't work.
It's important to get this working because we shall reuse a lot of Com+ components while beginning the migration to .Net
I really appreciate any help on this. I have not worked much with VB.Net yet, but have searched a lot to find a solution, without luck :-(
Lage
I have added the component as reference and .Net seem to communicate with the component.
I am using the following code to connect:
[code=vbnet]
Dim adm_event As Admin.Event
adm_event = CreateObject("a dmin.event")
[/code]
While running the procedure I get the error:
ErrorCode=-2147467259
Message="[DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied."
Source="Microso ft OLE DB Provider for SQL Server"
The connection string is stored in Global,asa as well as a few other parameters.
[code=vbnet]
Set objContext = GetObjectContex t()
connstring = objContext.Item ("Application") ("connstring ")
[/code]
I think it's this part that doesn't work.
It's important to get this working because we shall reuse a lot of Com+ components while beginning the migration to .Net
I really appreciate any help on this. I have not worked much with VB.Net yet, but have searched a lot to find a solution, without luck :-(
Lage
Comment