OleDB and Parameters
-
Does anyone else get as frustrated as me trying to use Parameters with queries? How much time do you spend trying to fix "Datatype mismatch in criteria expression" or other such errors? I find these errors nearly impossible to debug and fix. There's no way I can find out which parameter is not correct. Using Parameters is supposed to make creating complex queries neat and easy, but using Parameters has been nothing but a frustration for me.
-
Does anyone else get as frustrated as me trying to use Parameters with queries? How much time do you spend trying to fix "Datatype mismatch in criteria expression" or other such errors? I find these errors nearly impossible to debug and fix. There's no way I can find out which parameter is not correct. Using Parameters is supposed to make creating complex queries neat and easy, but using Parameters has been nothing but a frustration for me.
TheMandolinMan wrote:
How much time do you spend trying to fix "Datatype mismatch in criteria expression
None. I used stored procs and look what the data type is. :) Really its just a case of getting to know your system. As a long time contractor, when I go to a new site I tend to keep an Excel doc of the main columns and their types for a quick reference - unless the site has a good current data disctionar - and believe me, not many do :)
Bob Ashfield Consultants Ltd
-
Does anyone else get as frustrated as me trying to use Parameters with queries? How much time do you spend trying to fix "Datatype mismatch in criteria expression" or other such errors? I find these errors nearly impossible to debug and fix. There's no way I can find out which parameter is not correct. Using Parameters is supposed to make creating complex queries neat and easy, but using Parameters has been nothing but a frustration for me.
I agree with Bob, I spend 0 time working out data type, a trode procedure tells you right there at the top of the proc. I then have a code generator (internally built) that writes the stub for use in the business layer. Use stored procs....
Never underestimate the power of human stupidity RAH