RE: Passing Parameter Collections
- From: v-kevy@xxxxxxxxxxxxxxxxxxxx (Kevin Yu [MSFT])
- Date: Tue, 28 Mar 2006 01:49:33 GMT
Hi Vayse,
You're getting an "Object reference not set to an instance of an object."
because the paramsCustomer is only a reference which is not pointing to any
objects. Generally, when we're trying to create a new object reference
pointing to some valid objects, we use Dim a as New ClassA. This requires
the ClassA has a constructor. However, in this case, the class
OleDbParameter does not have a constructor, so we cannot create it without
the a Command.
If you already have a command object and need to assign a parameter
collection to it, just use oledbCommand.Parameters = Params
Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."
.
- Follow-Ups:
- Re: Passing Parameter Collections
- From: Vayse
- Re: Passing Parameter Collections
- References:
- Passing Parameter Collections
- From: Vayse
- Passing Parameter Collections
- Prev by Date: Exception of type System.StackOverflowException was thrown.
- Next by Date: Re: how to insert a null value to sqlparameter
- Previous by thread: Passing Parameter Collections
- Next by thread: Re: Passing Parameter Collections
- Index(es):
Relevant Pages
|