Search code examples
c#databaseoracle-databasems-accessref-cursor

Is there any equivalent of oracle ref cursor in MS Access?


We are looking for Oracle Ref Cursor alternative in MS Access database as we have small data.We want to go light but before jumping into MS Access just wanted to evaluate the features it has to offer.I am no MS-Access developer.


Solution

  • Access has no classical cursors that can be defined in SQL. Access SQL is too limited.

    But, a close analog of a cursor is DAO (Data Access Objects) under VBA. Using code, you can emulate most anything a Ref-Cursor can do.

    Overview DAO vs. Ref-Cursor

    • May be dynamically opened or opened based on logic. DAO = Yes; Ref-Cursor = Yes
    • Can be returned to a client (calling program). DAO = Yes; Ref-Cursor = Yes
    • Can be global. DAO = Yes; Ref-Cursor = NO
    • Can be passed from subroutine to subroutine. DAO = Yes; Ref-Cursor = Yes

    (Credit to Oracle PL/SQL REF Cursors)