[Mono-dev] facing problems while running VB.Net application on Monoin Linux

Arnhoffer Károly karnhoffer at ecron.hu
Mon May 29 05:08:08 EDT 2006


Hi,

Try the following: give the libclntsh.so path in the /etc/mono/config like:

<configuration>
...
	<dllmap dll="oci" target="/opt/oracle/920/lib/libclntsh.so" /> ... </configuration>

(K)
-----Original Message-----
From: mono-devel-list-bounces at lists.ximian.com [mailto:mono-devel-list-bounces at lists.ximian.com] On Behalf Of Singh, Narendra Kumar
Sent: Monday, May 29, 2006 5:52 AM
To: mono-devel-list at lists.ximian.com
Subject: [Mono-dev] facing problems while running VB.Net application on Monoin Linux


Hi ,
Actually we have developed an application which connects to Oracle 10G and accesses some tables. The application is working fine when it is build with Visual; Studio.Net 2003 But the sample application is not working on Linux in Mono The error is as follows Unhandled Exception: System.DllNotFoundException: oci 
in <0x00053> (wrapper managed-to-native) OciNativeCalls:OCIEnvCreate (intptr&,System.Data.OracleClient.Oci.OciEnvironmentMode,intptr,intptr,i
ntptr,intptr,int,intptr)
in <0x00020> System.Data.OracleClient.Oci.OciCalls:OCIEnvCreate
(intptr&,System.Data.OracleClient.Oci.OciEnvironmentMode,intptr,intptr,i
ntptr,intptr,int,intptr)
in <0x0005d> System.Data.OracleClient.Oci.OciEnvironmentHandle:.ctor
(System.Data.OracleClient.Oci.OciEnvironmentMode) 
in <0x0003c> System.Data.OracleClient.Oci.OciGlue:CreateConnection
(System.Data.OracleClient.OracleConnectionInfo) 
in <0x0002b> System.Data.OracleClient.OracleConnection:Open () 
in <0x0004f> (wrapper remoting-invoke-with-check) System.Data.OracleClient.OracleConnection:Open () 
in <0x0006a> Test:Main (string[]) 
 
 
and the code is as follows:
 
Imports System.Data
Imports System.Data.OracleClient
 
Public Class Form1
    Inherits System.Windows.Forms.Form
 
#Region " Windows Form Designer generated code "
 
    Public Sub New()
        MyBase.New()
 
        'This call is required by the Windows Form Designer.
        InitializeComponent()
 
        'Add any initialization after the InitializeComponent() call
 
    End Sub
 
    'Form overrides dispose to clean up the component list.
    Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
        If disposing Then
            If Not (components Is Nothing) Then
                components.Dispose()
            End If
        End If
        MyBase.Dispose(disposing)
    End Sub
 
    'Required by the Windows Form Designer
    Private components As System.ComponentModel.IContainer
 
    'NOTE: The following procedure is required by the Windows Form Designer
    'It can be modified using the Windows Form Designer.  
    'Do not modify it using the code editor.
    Friend WithEvents ListBox1 As System.Windows.Forms.ListBox
    <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
        Me.ListBox1 = New System.Windows.Forms.ListBox
        Me.SuspendLayout()
        '
        'ListBox1
        '
        Me.ListBox1.Location = New System.Drawing.Point(72, 48)
        Me.ListBox1.Name = "ListBox1"
        Me.ListBox1.Size = New System.Drawing.Size(104, 95)
        Me.ListBox1.TabIndex = 0
        '
        'Form1
        '
        Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
        Me.ClientSize = New System.Drawing.Size(292, 266)
        Me.Controls.Add(Me.ListBox1)
        Me.Name = "Form1"
        Me.Text = "Form1"
        Me.ResumeLayout(False)
 
    End Sub
 
#End Region
 
    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Dim con As New OracleConnection("Password=userdummy;User ID=dummyuser;Data Source=dot")
        con.Open()
        Dim da As New OracleDataAdapter("select USERID from dbuser", con)
        Dim ds As New DataSet
        da.Fill(ds, "dbuser")
        ListBox1.DataSource = ds.Tables("dbuser")
        ListBox1.DisplayMember = "USERID"
    End Sub
 
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
 
    End Sub
End Class
 
 
Please suggest some ways to solve this problem
Regards
Girish
 
 



More information about the Mono-devel-list mailing list