dotConnect Universal Documentation
Devart.Data.Universal Namespace / UniCursor Class
Members Example

In This Topic
    UniCursor Class
    In This Topic
    Represents Oracle cursor.
    Syntax
    'Declaration
     
    Public Class UniCursor 
    public class UniCursor 
    Remarks

    The UniCursor class represents Oracle CURSOR type. It can be used only with data providers for Oracle: OraDirect .NET, ODP.NET, Oracle Client.

    For information on how to use cursors with Universal .NET refer to article Working with Cursors.

    Example
    The following example demonstrates how to get table data as cursor:
    ...
    string cmdText = "BEGIN OPEN :cur FOR SELECT * FROM dept; END;";
    UniCommand cmd = new UniCommand(cmdText, myConnection);
    cmd.Parameters.Add("cur", UniDbType.Cursor);
    cmd.Parameters["cur"].Direction = ParameterDirection.Output;
    cmd.ExecuteNonQuery();
    UniCursor myCursor = (UniCursor)cmd.Parameters["cur"].Value;
    myDataAdapter.Fill(dataSet, "Table", myCursor);
    ...
    ...
    Dim cmdText As string = "BEGIN OPEN :cur FOR SELECT * FROM dept; END;"
    Dim cmd As UniCommand = new UniCommand(cmdText, myConnection)
    cmd.Parameters.Add("cur", UniDbType.Cursor)
    cmd.Parameters("cur").Direction = ParameterDirection.Output
    cmd.ExecuteNonQuery()
    Dim myCursor As UniCursor = CType(cmd.Parameters("cur").Value, UniCursor)
    myDataAdapter.Fill(dataSet, "Table", myCursor)
    ...
    Inheritance Hierarchy

    System.Object
       Devart.Data.Universal.UniCursor

    Requirements

    Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

    See Also