Print Page | Close Window

Using IdeaBlade to call a generic stored procedure

Printed From: IdeaBlade
Category: DevForce
Forum Name: DevForce 2010
Forum Discription: For .NET 4.0
URL: http://www.ideablade.com/forum/forum_posts.asp?TID=3019
Printed Date: 28-Apr-2025 at 12:33am


Topic: Using IdeaBlade to call a generic stored procedure
Posted By: pponzano
Subject: Using IdeaBlade to call a generic stored procedure
Date Posted: 17-Oct-2011 at 12:44am
Hello,
I'm trying to develop a simple app with IdeaBlade, I've been asked if it's possible to have ideablade to call programmatically a store procedure and generate at runtime a complex object, I've got a series of stored that return a really simple data, it's most like a select * from xxxx where <user has permission to see data> and there're almost 300 SP ... I don't want to create 300 Complex data... is there a way I can handle this?
Thanks in advance

Paolo



Replies:
Posted By: sbelini
Date Posted: 17-Oct-2011 at 6:12pm
Hi Paolo,

Unfortunately, you will have to create the complex types for your stored procedures. 
The good news is that the Entity Designer can create the complex types for you.

When importing the stored procedure (Add Function Import) follow the steps below:
 
1. Select the Stored Procedure name;
2. Select Complex for return type;
3. Click on 'Get Column Information';
4. Click on 'Create New Complex Type'

You can also find more information about Stored Procedure Queries in the http://drc.ideablade.com/xwiki/bin/view/Documentation/stored-procedure-queries - DevForce Resource Center . There you will also find a detailed http://drc.ideablade.com/xwiki/bin/view/Documentation/code-sample-stored-procedure-queries-silverlight - walkthrough .
 
Note that if your Stored Proc return all columns (i.e. SELECT * ...) you might want to use the Entity itself instead.
 
Regards,
   Silvio.


Posted By: pponzano
Date Posted: 18-Oct-2011 at 12:57am
Thanks a lot Silvio (Grazie!)



Print Page | Close Window