Link to home
Start Free TrialLog in
Avatar of smintire001
smintire001Flag for United States of America

asked on

Unidata uniobjects for .net socket connection error.

I have the code shown below which worked until today.  For some odd reason it stopped working.  It won't connect to the unidata database.  It gives me the following error:
connection failed : An address incompatible with the requested protocal was used ::1:31438.

The Visual Studio error reads:
A first chance exception of type 'System.Net.Sockets.SocketException' occurred in UODOTNET.dll

Imports IBMU2.UODOTNET
Class App
 
    Public Shared Function Main(ByVal args() As String) As Integer
 
        Dim us1 As UniSession = Nothing
 
        Try
            Console.WriteLine("Program started... ")
            us1 = UniObjects.OpenSession("computername", "username", "password", "C:\IBM\ud72\Demo")
        Catch e As Exception
            If Not (us1 Is Nothing) Then
                If (us1.IsActive) Then
                    UniObjects.CloseSession(us1)
                    us1 = Nothing
                End If
            End If
            Console.WriteLine("")
            Dim s As String
            s = "Connection Failed : " + e.Message
            Console.WriteLine(s)
        Finally
            If Not (us1 Is Nothing) Then
                If (us1.IsActive) Then
                    Console.WriteLine("")
                    Dim s As String
                    s = "Connection Passed"
                    Console.WriteLine(s)
                    UniObjects.CloseSession(us1)
                    Console.WriteLine("Program finished... ")
                End If
 
            End If
 
        End Try
        Console.Read()
        Return 0
    End Function 'Main

Open in new window

Avatar of smintire001
smintire001
Flag of United States of America image

ASKER

Edited question.
ASKER CERTIFIED SOLUTION
Avatar of smintire001
smintire001
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial