OleDbParameter - Maybe not a bug... but it still sucks!

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Howdy,

Can someone please explain the rational of letting an OleDbCommand take more
parameters than the query string is expecting. If i have 3, ???, in an
Access Query string, and i supply 4 parameters, it DOESN'T fall over/throw
an exception? Whats the benefit to the developer of this behaviour?

Ive just wasted 45 bloody minutes dicking around with this? O.k so i should
have looked a little closer... and it's probably my own damn fault for using
dirty old A2K as a datastore, but the query actually had 21 paramters and i
only supplied 20 ?.

I'd much rather it fail, than pass through the values all out of order....
because it still allows an invalid method to return true. This behaviour is
a bunch of arse.

:(

What an incredibly dull reason for the error. I was expecting something a
little more FANTASTIC!

TIA
Richard
 
¤ Howdy,
¤
¤ Can someone please explain the rational of letting an OleDbCommand take more
¤ parameters than the query string is expecting. If i have 3, ???, in an
¤ Access Query string, and i supply 4 parameters, it DOESN'T fall over/throw
¤ an exception? Whats the benefit to the developer of this behaviour?
¤
¤ Ive just wasted 45 bloody minutes dicking around with this? O.k so i should
¤ have looked a little closer... and it's probably my own damn fault for using
¤ dirty old A2K as a datastore, but the query actually had 21 paramters and i
¤ only supplied 20 ?.
¤
¤ I'd much rather it fail, than pass through the values all out of order....
¤ because it still allows an invalid method to return true. This behaviour is
¤ a bunch of arse.
¤
¤ :(
¤
¤ What an incredibly dull reason for the error. I was expecting something a
¤ little more FANTASTIC!

Don't believe the Jet database engine will attempt to resolve parameters not defined in the query.
Any extra you supply via the provider are simply ignored.


Paul ~~~ (e-mail address removed)
Microsoft MVP (Visual Basic)
 
Back
Top