New Posts New Posts RSS Feed: Using IdeaBlade to call a generic stored procedure
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

Using IdeaBlade to call a generic stored procedure

 Post Reply Post Reply
Author
pponzano View Drop Down
Senior Member
Senior Member
Avatar

Joined: 28-Apr-2011
Location: Italy
Posts: 165
Post Options Post Options   Quote pponzano Quote  Post ReplyReply Direct Link To This Post Topic: Using IdeaBlade to call a generic stored procedure
    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
Back to Top
sbelini View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 13-Aug-2010
Location: Oakland
Posts: 786
Post Options Post Options   Quote sbelini Quote  Post ReplyReply Direct Link To This Post 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 DevForce Resource Center. There you will also find a detailed walkthrough.
 
Note that if your Stored Proc return all columns (i.e. SELECT * ...) you might want to use the Entity itself instead.
 
Regards,
   Silvio.
Back to Top
pponzano View Drop Down
Senior Member
Senior Member
Avatar

Joined: 28-Apr-2011
Location: Italy
Posts: 165
Post Options Post Options   Quote pponzano Quote  Post ReplyReply Direct Link To This Post Posted: 18-Oct-2011 at 12:57am
Thanks a lot Silvio (Grazie!)
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down