Home All Groups Group Topic Archive Search About

Navigation using ODP.net

Author
1 Apr 2006 6:21 AM
Nau
Dear All,


    i have establish a connection to Oracle 10g using ODP.net , i could



populate data in a listbox/combo box, but i need to display these data
in one by one , i mean navigation using
|<  <  >  >|  these buttons , plshelp me


blw is the code i'm using to populate data in combo/list box
-----------------------------------------
dbconnection.getConnection()   ' connection string written in a module
calling her e


        Dim conn As New OracleConnection(oradb)


        Dim exp As Exception
        Try
            conn.Open()
            Dim sql As String = "select EMPNO,ENAME,mgr  from emp where



1 =1 "
            Dim cmd As New OracleCommand(sql, conn)
            cmd.CommandType = CommandType.Text
            Dim dr As OracleDataReader = cmd.ExecuteReader()


          While dr.Read()
                ListBox1.Items.Add(dr.Item(1))
            End While
            conn.Close()
            conn.Dispose()
        Catch exp
            MsgBox(exp.Message.ToString)
        End Try

Author
1 Apr 2006 12:55 PM
Terry Burns
Note : DataReaders are one direction only

Private function ReadForward(dr as DataReader) as object

      dim obj as Object = dr.read

      return object

End Function





--
Terry Burns
http://TrainingOn.net
Show quote
"Nau" <mydotnetdo***@gmail.com> wrote in message
news:1143872506.303472.67680@u72g2000cwu.googlegroups.com...
> Dear All,
>
>
>    i have establish a connection to Oracle 10g using ODP.net , i could
>
>
>
> populate data in a listbox/combo box, but i need to display these data
> in one by one , i mean navigation using
> |<  <  >  >|  these buttons , plshelp me
>
>
> blw is the code i'm using to populate data in combo/list box
> -----------------------------------------
> dbconnection.getConnection()   ' connection string written in a module
> calling her e
>
>
>        Dim conn As New OracleConnection(oradb)
>
>
>        Dim exp As Exception
>        Try
>            conn.Open()
>            Dim sql As String = "select EMPNO,ENAME,mgr  from emp where
>
>
>
> 1 =1 "
>            Dim cmd As New OracleCommand(sql, conn)
>            cmd.CommandType = CommandType.Text
>            Dim dr As OracleDataReader = cmd.ExecuteReader()
>
>
>          While dr.Read()
>                ListBox1.Items.Add(dr.Item(1))
>            End While
>            conn.Close()
>            conn.Dispose()
>        Catch exp
>            MsgBox(exp.Message.ToString)
>        End Try
>
Author
1 Apr 2006 2:29 PM
Yuancai (Charlie) Ye
Hi,
    See the site http://www.udaparts.com/devguide.htm for bidirectionally
navigating a large set of records from .NET.

--
Yuancai (Charlie) Ye

Fast accessing all of remote data sources anywhere with SocketPro using
batch/queue, non-blocking and parallel computation
See 30 well-tested and real OLEDB examples
at http://www.udaparts.com


Show quote
"Nau" <mydotnetdo***@gmail.com> wrote in message
news:1143872506.303472.67680@u72g2000cwu.googlegroups.com...
> Dear All,
>
>
>     i have establish a connection to Oracle 10g using ODP.net , i could
>
>
>
> populate data in a listbox/combo box, but i need to display these data
> in one by one , i mean navigation using
> |<  <  >  >|  these buttons , plshelp me
>
>
> blw is the code i'm using to populate data in combo/list box
> -----------------------------------------
> dbconnection.getConnection()   ' connection string written in a module
> calling her e
>
>
>         Dim conn As New OracleConnection(oradb)
>
>
>         Dim exp As Exception
>         Try
>             conn.Open()
>             Dim sql As String = "select EMPNO,ENAME,mgr  from emp where
>
>
>
> 1 =1 "
>             Dim cmd As New OracleCommand(sql, conn)
>             cmd.CommandType = CommandType.Text
>             Dim dr As OracleDataReader = cmd.ExecuteReader()
>
>
>           While dr.Read()
>                 ListBox1.Items.Add(dr.Item(1))
>             End While
>             conn.Close()
>             conn.Dispose()
>         Catch exp
>             MsgBox(exp.Message.ToString)
>         End Try
>
Author
5 Apr 2006 11:55 AM
Zhou Peng
Why not save those data into memeory variable such as ArrayList, and then 
you can use them as you like.

On Sat, 01 Apr 2006 15:21:46 +0900, Nau <mydotnetdo***@gmail.com> wrote:

Show quote
> Dear All,
>
>
>     i have establish a connection to Oracle 10g using ODP.net , i could
>
>
>
> populate data in a listbox/combo box, but i need to display these data
> in one by one , i mean navigation using
> |<  <  >  >|  these buttons , plshelp me
>
>
> blw is the code i'm using to populate data in combo/list box
> -----------------------------------------
> dbconnection.getConnection()   ' connection string written in a module
> calling her e
>
>
>         Dim conn As New OracleConnection(oradb)
>
>
>         Dim exp As Exception
>         Try
>             conn.Open()
>             Dim sql As String = "select EMPNO,ENAME,mgr  from emp where
>
>
>
> 1 =1 "
>             Dim cmd As New OracleCommand(sql, conn)
>             cmd.CommandType = CommandType.Text
>             Dim dr As OracleDataReader = cmd.ExecuteReader()
>
>
>           While dr.Read()
>                 ListBox1.Items.Add(dr.Item(1))
>             End While
>             conn.Close()
>             conn.Dispose()
>         Catch exp
>             MsgBox(exp.Message.ToString)
>         End Try
>



--
Tony Zhou

AddThis Social Bookmark Button