Database size by general stored procedure

Thread is closed for posting
2 posts, 0 answers
  1. MWW
    MWW avatar
    6 posts
    Member since:
    Oct 2012

    Posted 22 Aug 2013 Link to this post

    Dear Telerik, 

    I use Telerik ORM in my project and works great. 

    I have only one problem with quite specific issue - I want to collect database size to put this value for user. 

    I use MS SQL 2008  Express db and there is special stored procedure for this: sp_spaceused. Maybe problem is that stored procedure use different context (not dbo) ? 

    I try to find solution for make this but I can't find anything what will works. 

    Can you help me ? 

    Best regards, 

    PS. I use 
  2. Ady
    Ady avatar
    589 posts

    Posted 26 Aug 2013 Link to this post

    Hi Mikolaj,

     If I understand you right, you want to execute the 'sp_spacesused' stored procedure ? You can use the 'OpenAccessContextBase.ExecuteNonQuery' method to call the procedure. Note that calling this method will start a transaction. Since the procedure performs a read-only operation you can call context.ClearChanges() after ExecuteNonQuery to rollback the transaction.

    Do get back in case you need further assistance.

    OpenAccess ORM Q2 2013 brings you a more powerful code generation and a unique Bulk Operations support with LINQ syntax. Check out the list of new functionality and improvements shipped with this release.
Back to Top