0
Answer

DATAGRID View using OracleInProcServer

guys please help or any idea
im using OracleInProcServer.XOraSession in oracle 10g
my problem is how to put the data (from oracle table )
to data grid using VB.net

using OLEDB connection can be done like this

   Dim DBConnection As String = "Provider=MSDAORA;Password=;User ID=;Data Source=SID"
        Dim myConnection As OleDbConnection = New OleDbConnection
        myConnection.ConnectionString = DBConnection
        Dim mysql As String

        mysql = "Select billno BILLNo,SEQ,blhawb WAYBILL, forwarder FWDRCODE, forwdesc FWDRDESC," _
              & " SHIPCODE, SHIPDESC,expensdesc EXPENSECODE, SHIPWAY, amountfc AMOUNT," _
              & " curr CURRENCY,exchanrat RATE, paymndate PAYMENTDATE from EXPDTL where Billno = '" & Form1.txtBillNo.Text & "'" _
              & " order by seq"

        Dim da As OleDbDataAdapter = New OleDbDataAdapter(mysql, myConnection)
        Dim ds As DataSet = New DataSet
        da.Fill(ds, "mySql")
        Form1.dg.DataSource = ds.Tables("mysql")



how can i convert this using OracleInProcServer.XOraSession
to put the data of tables in data grid

here is my code

        Dim OraSession As OracleInProcServer.OraSession
        Dim OraDatabase As OracleInProcServer.OraDatabase
        Dim ExpCode As OracleInProcServer.OraDynaset
        Dim MyDate As DateTime = DateTime.Now
        Dim CrtDate, MySQL As String
       

        OraSession = CreateObject("OracleInProcServer.XOraSession")
        OraDatabase = OraSession.OpenDatabase("SID", "uname/pwd", 0)


        MySQL = "select * from expdtl"
        ExpCode = OraDatabase.CreateDynaset(MySQL, 0)


       form1.dg.DataSource = ??? - what should be my date source of in order to
                                            put the data of table in datagrid (dg)

thank you for your help in advance