This is a migrated thread and some comments may be shown as answers.

Database size by general stored procedure

1 Answer 53 Views
Development (API, general questions)
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
MWW
Top achievements
Rank 1
MWW asked on 22 Aug 2013, 01:08 PM
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, 
MWW

PS. I use VB.net. 

1 Answer, 1 is accepted

Sort by
0
Ady
Telerik team
answered on 26 Aug 2013, 03:35 PM
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.

Regards,
Ady
Telerik
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.
Tags
Development (API, general questions)
Asked by
MWW
Top achievements
Rank 1
Answers by
Ady
Telerik team
Share this question
or