amigo02
Programmer
- Feb 19, 2003
- 109
I have a vb6 component with following code
Public objContext As COMSVCSLib.ObjectContext
Public Request As Object
Public session As Object
Public Application As Object
Public Server As Object
Private rs As ADODB.Recordset
Public Function Init()
Set objContext = GetObjectContext()
Set Request = objContext.Item("Request")
Set session = objContext.Item("Session")
Set Application = objContext.Item("Application")
Set Server = objContext.Item("Server")
Set rs = New ADODB.Recordset
Set conn = oConn
End Function
when I upgrade it to vb.net it becomes as follows;
Public Function Init() As Object
Public Request As Object
Public session As Object
Public Application As Object
Public Server As Object
Private rs As ADODB.Recordset
Public Function Init() As Object
objContext = COMSVCSLibAppServer_definst.GetObjectContext()
Request = objContext.Item("Request")
session = objContext.Item("Session")
Application = objContext.Item("Application")
Server = objContext.Item("Server")
rs = New ADODB.Recordset()
conn = oConn
End Function
but in converted vb.net project I can't access the request, session, application and server object's properties and methods.
What am I doing wrong!
Additionaly during upgrade vb.net added a new file into the project with the following code;
Module UpgradeSupport
Friend COMSVCSLibGetSecurityCallContextAppObject_definst As New COMSVCSLib.GetSecurityCallContextAppObject
Friend COMSVCSLibAppServer_definst As New COMSVCSLib.AppServer
Friend OutlookApplication_definst As New Outlook.Application
End Module
Please help......
Public objContext As COMSVCSLib.ObjectContext
Public Request As Object
Public session As Object
Public Application As Object
Public Server As Object
Private rs As ADODB.Recordset
Public Function Init()
Set objContext = GetObjectContext()
Set Request = objContext.Item("Request")
Set session = objContext.Item("Session")
Set Application = objContext.Item("Application")
Set Server = objContext.Item("Server")
Set rs = New ADODB.Recordset
Set conn = oConn
End Function
when I upgrade it to vb.net it becomes as follows;
Public Function Init() As Object
Public Request As Object
Public session As Object
Public Application As Object
Public Server As Object
Private rs As ADODB.Recordset
Public Function Init() As Object
objContext = COMSVCSLibAppServer_definst.GetObjectContext()
Request = objContext.Item("Request")
session = objContext.Item("Session")
Application = objContext.Item("Application")
Server = objContext.Item("Server")
rs = New ADODB.Recordset()
conn = oConn
End Function
but in converted vb.net project I can't access the request, session, application and server object's properties and methods.
What am I doing wrong!
Additionaly during upgrade vb.net added a new file into the project with the following code;
Module UpgradeSupport
Friend COMSVCSLibGetSecurityCallContextAppObject_definst As New COMSVCSLib.GetSecurityCallContextAppObject
Friend COMSVCSLibAppServer_definst As New COMSVCSLib.AppServer
Friend OutlookApplication_definst As New Outlook.Application
End Module
Please help......