Wrox Programmer Forums
|
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 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 May 14th, 2004, 10:51 PM
Registered User
 
Join Date: May 2004
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default About IDataParameter( )

Hi, guys,
What's up with (p.35) using IDataParameter() instead of a SQLParameterCollection? For one thing doesn't the latter implement the former? In any case I can't get the former to convert to the latter. In the BuildIntCommand() function, for instance, I use "ByVal parameters As IDataParamter()" and this won't convert in the body of the function on the line, "Dim command as SQLCommand = BuildquesryCommand(SPName, parameters)" . Yup, it doesn't like parameters being type IDataParameter.

I suppose I can substitute SQLParameterCollection, right? But why is the book using IDataParameter?

Thanks .... Paul


 
Old May 19th, 2004, 12:02 PM
Registered User
 
Join Date: May 2004
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

OK, I'll reply to my own post. I'll bite. Maybe somebody can lend a word or two on this subject after hearing about my solution.

Again, this is in Core.DLL, the DBOject class: I've replaced references to IDataParameter() with SQLParameter() and it works fine. I did not use SQLParameterCollection - that had problems. I think the problem was that I couldn't get it to convert for use in the command object. Yeh, that's what it was.

So, I am rather new to the intermediate level and don't really get why the book suggests passing IDataParameter() or why nobody else reported having problems with it. Anybody with a bit 'o help to understand that?







Similar Threads
Thread Thread Starter Forum Replies Last Post
IDataParameter() instead of SqlParameter() organicglenn BOOK: ASP.NET Website Programming Problem-Design-Solution 0 March 25th, 2004 12:39 AM





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