Wrox Programmer Forums
|
BOOK: ASP.NET 3.5 Enterprise Application Development with Visual Studio 2008: Problem Design Solutio
This is the forum to discuss the Wrox book ASP.NET 3.5 Enterprise Application Development with Visual Studio 2008: Problem Design Solution by Vincent Varallo; ISBN: 9780470396865
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: ASP.NET 3.5 Enterprise Application Development with Visual Studio 2008: Problem Design Solutio section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 23rd, 2009, 09:36 PM
Authorized User
 
Join Date: Sep 2009
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default Ch7 - error creating methos with ORM designer

Hello,
when trying to drag and drop stored procedures onto concerned table, i get an error. i cut and pasted code from chapter download. but ican't figure out what is the problem.
same error for all "custom" stored procedures defined on page 207 and the following. other sp are ok,
seems that the pb comes with sp with "select count() statement
any idea?
thx. Georges

Last edited by moulot; September 25th, 2009 at 12:05 AM.. Reason: more explanation
 
Old October 29th, 2009, 04:59 PM
Authorized User
 
Join Date: Mar 2009
Posts: 79
Thanks: 4
Thanked 4 Times in 4 Posts
Default

post the error here and I will see if I can help you.
 
Old October 29th, 2009, 06:06 PM
Authorized User
 
Join Date: Mar 2008
Posts: 62
Thanks: 1
Thanked 3 Times in 3 Posts
Send a message via Yahoo to kalel_4444
Default

You need to drop Stored Procedures that are not entity objects into the method pane not onto the table object.
When doing this an object with the same name as the sproc + "Result" will be created.
Don't take blame, this wasn't mentioned to do this in the book and could be confusing.

The rule of thumb to follow is, procedures that are delete, insert, update, or select that does not return the entity object itself (such as count), drop it into the ORM Method Pane. Otherwise you'll get the error you're getting because the sproc's result doesn't match the table.

FYI: NOT all custom sproc's. Some return an entity, but are custom because it passes a different parameter... eg. SelectByWorkflowId(int workflowId)

Ronnie





Similar Threads
Thread Thread Starter Forum Replies Last Post
ORM Framework related whyvenky Intro Programming 2 April 10th, 2006 07:52 AM
ActiveX Designer error '80043ac1' Anish BOOK: Professional Crystal Reports for VS.NET 0 May 20th, 2005 08:41 AM
Creating DataEnvironment Designer jdeaver VB How-To 0 February 3rd, 2005 12:39 PM
Parse error: CH7 p198 willburke BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 0 October 16th, 2004 08:07 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.