Release 10.1A: OpenEdge Data Management:
SQL Reference

> ## DhSQLResultSet.insert

> Inserts the currently active row into a procedure’s result set.

> ##### Format

> `public void insert()`

> ##### Returns

> None

> ##### Parameters

> None

> ##### Throws

> `DhSQLException`

> Example

> This code fragment illustrates `SQLResultSet.set` and `SQLResultSet.insert`:

>     CREATE PROCEDURE get_sal2 ()
>     RESULT (
>         empname CHAR(20),
>         empsal   NUMERIC,
>     )
>     BEGIN
>         String ename = new String (20) ;
>         BigDecimal esal = new BigDecimal () ;
>         SQLCursor empcursor = new SQLCursor (
>             "SELECT name, sal FROM emp " ) ;

>         empcursor.Open () ;
>         do
>         {
>             empcursor.Fetch ();
>             if (empcursor.found ())
>             {
>                     empcursor.getValue (1, ename);
>                     empcursor.getValue (2, esal);
>                 SQLResultSet.Set (1, ename);
>                 SQLResultSet.Set (2, esal);
>                 SQLResultSet.Insert ();
>             }
>         } while (empcursor.found ()) ;
>         empcursor.close () ;
>     END

Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095