Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
IDbCommand IDbDataParameter logistics
Message
 
À
02/01/2004 20:44:37
Information générale
Forum:
ASP.NET
Catégorie:
ADO.NET
Divers
Thread ID:
00863398
Message ID:
00863605
Vues:
11
>>>That seems like a real missing feature since all providers can in fact retrun a parmaeters through their Add methods. But it's a different collection for each and those collections do not inherit from IDataParameterCollection. It's a design flaw that breaks the whole 'Interface' based access mechanism.<
>
>When I was playing with this this morning, it did seem odd to me that there was an IDbDataParameter that allowed you to add only a Parameter object, but
didn't have any way of creating a generic Parameter object.

Well, in a way this makes sense. The typed value must come from somewhere and I guess the designers assumed that you would provide this yourself. If you're in a data access layer this is Ok, but if you're in totally generic code (say a static method) you might not have the ability to do this. However the underlying provider specific providers can all do this so it seems lame that there's no interface that exposes this feature.

>Well, of course I don't know exactly how you are doing things, but it seems to me that anything to do with parameters belongs in the DataAccess layer anyway. <g> So what were you trying to do with Parameters in the BizObject? I'm just curious about your methodology.

Yeah, that's true, but as I said this was something more generic for some of my utility apps where I don't actually use a DA layer. The idea is you pass in a DataRow and Command and it does its thing. Unfortunately it didn't work out that way <g>...

Anyway, I ended up throwing the DA layer into the tool and now there's no issue...

I posted some more info on this at (so I remember this next time it comes up).

http://west-wind.com/weblog/posts/186.aspx

I don't write code like this very often at least in the bus object - usually only to call one off stored procs or ExecScalar requests like the one described in the sample. Simple things where it makes no sense to go through the whole bus object infrastructure...

+++ Rick ---
+++ Rick ---

West Wind Technologies
Maui, Hawaii

west-wind.com/
West Wind Message Board
Rick's Web Log
Markdown Monster
---
Making waves on the Web

Where do you want to surf today?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform