> I am running Unidata 6.1 on Solaris 9.
>
> I am trying to make a simple connection to the database within VB.NET
> using the uodotnet.dll.
>
> To try and do so I have used the following code;
>
> Imports IBMU2.UODOTNET
>
> Public Class WebForm1
> Inherits System.Web.UI.Page
> Protected WithEvents Label1 As System.Web.UI.WebControls.Label
>
> #Region " Web Form Designer Generated Code "
>
> 'This call is required by the Web Form Designer.
> <System.Diagnostics.DebuggerStepThrough()> Private Sub
> InitializeComponent()
>
> End Sub
>
> Private Sub Page_Init(ByVal sender As System.Object, ByVal e As
> System.EventArgs) Handles MyBase.Init
> 'CODEGEN: This method call is required by the Web Form
> Designer
> 'Do not modify it using the code editor.
> InitializeComponent()
> End Sub
>
> #End Region
>
> Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
> System.EventArgs) Handles MyBase.Load
> 'Put user code to initialize the page here
>
> Dim mySession As UniSession
>
> Try
> mySession = UniObjects.OpenSession("<hostname>",
> "<account>", "<password>", "<path>", "udcs")
>
> Label1.Text = mySession.IsActive.ToString
>
> Catch ex As UniSessionException
>
> Label1.Text = ex.Message.ToString
>
> End Try
>
>
> End Sub
>
> End Class
>
> When running this code I receive the following message from the
> UniSessionException that is thrown;
>
> Exception caught!!!SystemInvalid PInvoke metadata format.[IBM
> U2][UODOTNET - UNIRPC][ErrorCode=81011] The host name is not valid, or
> the host is not responding Source: UniRPCConnection Class Method: Void
> set_Host(System.String) at
> IBMU2.UODOTNET.UniRPCConnection.set_Host(String value) at
> IBMU2.UODOTNET.UniSession.Connect()
>
> I have ensured that the real hostname which is noted in the code as
> "<hostname>" can be reached by the machine hosting the .NET
> application.
>
> Any ideas would be muchly appreciated.
-------
u2-users mailing list
[EMAIL PROTECTED]
To unsubscribe please visit http://listserver.u2ug.org/

Reply via email to