> > Enumerate the ADO.Connection.Errors collection to find the exact error.
> > Run the .Supports method to find out whether your provider/driver and cursor
[quoted text clipped - 9 lines]
> above, the .staus property in Fields collection not show any
> information (status = 0 ever).
> > > Enumerate the ADO.Connection.Errors collection to find the exact error.
> > > Run the .Supports method to find out whether your provider/driver and cursor
[quoted text clipped - 12 lines]
> I need to khnow the name of field that origin the error.
> Ciao
It isn't 'resolution' as much as narrowing down the possibilities.
The *exact* error helps. Is this the only error in the collection?
That the provider doesn't support this construct is the most common factor
in failures. That's why I emphasized that you check that out first. Some
providers will allow this construct but with only limited datatype support.
For example, Longs, characters, and short strings may work, but currency,
dates, doubles, etc. may fail.
[Note: when I use the term "provider" I'm including the whole 'stack' -
provider, database engine, and the kind of database itself.]
So can I now assume that you can make a simple test work - e.g., something
with two fields and two simple values - therefore you are positive that your
provider and configuration DOES supports this construct? That still isn't
clear.
Don't forget that you are using 3-levels of indirection.
1) When you created the vValues array. All the values are converted to
variants.
2) When the Update method evaluates or converts the variants back into
datatypes. Using its best guess as to what its representation should be.
3) And finally when the constructed query is presented and parsed by the
provider.
My suggestion is to work out mutliple test cases with different datatypes
and try them out. Paying particular attention to dates and long strings.
Look for things like CDbl() returning "23,5" instead of "23.5", or strings
too long for the Field, ...
AFAIK the error will either report the field or it will not. (Again Provider
dependent) In this case it appears it does not. I do know that the construct
has problems and therefore always test before using it. (Actually I usually
avoid it unless I already have values in an array due to the architecure of
the program.)
Report back if you ever do find the exact cause. It may help others.
-ralph
Dedalus - 22 Apr 2008 15:06 GMT