on 06-16-2004 11:47 PM
I have created a console app which is working correclty as a RFC server. I want to convert it to a Windows Service.
I'm getting error: Object Not Set To and Instance of an Object
Dim myargs() As String
Try
ReDim myargs(3)
EventLog1.WriteEntry(UBound(myargs))
myargs(0) = "-aPJ1.rfcserv"
myargs(1) = "-gsap008.myserver.com"
myargs(2) = "-xSAPGW08"
Catch ex As Exception
EventLog1.WriteEntry(ex.Message)
End Try
Const numberOfServers As Integer = 3
Dim host As SAP.Connector.SAPServerHost
host = New SAP.Connector.SAPServerHost
Dim server As SAPProxyDllImpl
For I As Integer = 1 To numberOfServers
Try
'ERROR OCCURRING WITH THIS
server = New SAPProxyDllImpl(myargs, host)
Catch ex As Exception
EventLog1.WriteEntry(ex.Message)
End Try
Next
Any Ideas are appreciated.
Is there any documentation for creating a Windows Service as an RFC Server?
Philip
Thanks.. I looked at it too long yesterday. Your correction worked.
Philip
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Array myargs(3) has 4 elements but only the first 3 are initialized with a valid string.
Regards,
Guangwei Li
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It would be easier to find the reason of the problem if you write the whole call stack to event log:
EventLog1.WriteEntry(ex.ToString())
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.