Ticket B1418
Visible to All Users

Add support for stored procedures

created 19 years ago

Can not use stored procedures with XPO.
From our experience majority of Enterprise project require Database access via Stored Procedures due to Company Security Policy.
Implementing access to Database via Stored Procedure will greatly increase appeal to Enterprise developers.
Proposed Solution:
Implement Stored Procedures as part of XPO or provide hooks for template generated (MyGeneration, CodeSmith) stored procedures.

Answers

created 14 years ago (modified 8 years ago)

Implementation Details:
Now, you have two ways to work with stored procedures:
- Directly execute stored procedures and handle returned data via the ExecuteSproc and GetObjectsFromSproc methods available in sessions and units of work.
- Map persistent classes on database views with the help of stored procedures and INSTEAD-OF triggers redirecting INSERT, UPDATE, and DELETE operations to stored procedures.
To help you out when working with stored procedures, the Persistent Classes wizard has been extended with options to generate:
- Helper classes to execute stored procedures and pass parameters.
- Persistent classes to map to database views.
- Data Description Language code for database views, INSTEAD-OF triggers, and stored procedures implementing INSERT, UPDATE and DELETE functionality.
Note: The Advantage, DB2, Firebird, MySql, and Pervasive databases have some known restrictions on generating result set columns, while the MSAccess database does not support getting the list of stored procedures. These issues may affect the Generating Persistent Classes wizard, which works just fine with other databases supported by XPO. Anyway, you can use the ExecuteSproc and GetObjectsFromSproc methods to call stored procedures for any database, except for the MSSqlServerCE and SQLite databases, which do not support stored procedures at all.
For more information, please refer to the following help topics:
DevExpress ORM Tool > Feature Center > Querying a Data Store > Stored Procedures
DevExpress ORM Tool > Feature Center > Querying a Data Store > Direct SQL Queries

Thanks,
DevExpress XPO Team

    Comments (2)
    JK JK
    Jacek Kosinski 8 years ago

      both links to articles are broken …

      Dennis Garavsky (DevExpress) 8 years ago

        @Jacek: I have updated these links. Please refer to the official product documentation articles instead:
        DevExpress ORM Tool > Feature Center > Querying a Data Store > Stored Procedures
        DevExpress ORM Tool > Feature Center > Querying a Data Store > Direct SQL Queries

        Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

        Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.