Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: ASP.NET Website Programming Problem-Design-Solution
This is the forum to discuss the Wrox book ASP.NET Website Programming: Problem - Design - Solution, Visual Basic .NET Edition by Marco Bellinaso, Kevin Hoffman; ISBN: 9780764543869
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: ASP.NET Website Programming Problem-Design-Solution section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old December 23rd, 2004, 02:33 PM
Registered User
 
Join Date: Dec 2004
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default DbObject class

I just started reading this book and I am going through the DbObject Class section in chapter 2. I understand everything except for the last RunProcedure method on page 38. I don't understand why it uses the BuildIntCommand in the following line:

sqlDA.SelectCommand = BuildIntCommand(storedProcNamem, parameters);

I understand the purpose of the BuildIntCommand is to return the value of the store procedure, and I agree this makes sense for the first RunProcedure on page 36-37 that is used to insert, update and delete items in the database.

But I don't understand why they use the BuildIntCommand in this RunProcedure method when it is used to select from the database and fill a DataSet object. Why don't they use the BuildQueryCommand instead? Is this just an error in the book? If not, can someone explain why they use the BuildIntCommand?

Thanks

  #2 (permalink)  
Old December 25th, 2004, 08:41 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: Atlanta, Georgia, USA.
Posts: 917
Thanks: 0
Thanked 0 Times in 0 Posts
Default

It will work either way, but it would be more efficient to use BuildQueryCommand if you don't need a result value.

Eric
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Property access from Class within Partial Class zoltac007 C# 2005 0 December 1st, 2006 01:01 AM
Regarding Class Library (.dll) from class file manish.sharma04 BOOK: Wrox's ASP.NET 2.0 Visual Web Developer 2005 Express Edition Starter ISBN: 978-0-7645-8807-5 1 March 3rd, 2006 07:32 AM
DBObject problem masoud BOOK: ASP.NET Website Programming Problem-Design-Solution 1 January 7th, 2004 08:09 PM
Help with DBObject base class projectedNexus BOOK: ASP.NET Website Programming Problem-Design-Solution 1 August 12th, 2003 06:36 PM
DBObject.vb Question cwildner BOOK: ASP.NET Website Programming Problem-Design-Solution 0 July 14th, 2003 12:44 PM



All times are GMT -4. The time now is 04:58 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.