Object of SQLParameterCollection

vicks

New member
Joined
Dec 13, 2005
Messages
4
Programming Experience
1-3
SQLParameterCollection's constructor is private - so cannot directly write as -

Dim objSQLParameterCollection as New SQLParameterCollection

If you cannot instantiate object, then how does SQLCommand object create SQLParameterCollection object?
(It returns SQLParameterCollection object with Parameters property)
 
That's perfectly alright. I was curious about SQLCommand class.

How does SQLCommand create object of SQLParameterCollection internally ? (that was my question...)
Does it have special permissions (or whatever...) ?
 
Basicaly, in a nutshell... yes... the class is essentialy a non-creatable class... a shared class .... static in C terms. It actualy isn't a collection as much as it is a helper class of sorts to basicaly make it easier for you to manipulate the parameters. Internaly there probably is a collection, but it's proly just that a colection. The SQLParameterCollection class is you interface to it.

-tg
 
Back
Top