We currently have our cursoradapter class wheretype set to the default of 3 -
KEY AND MODIFIED. On some files we are getting the error SQL statement too
long. We know we can set SYS(3055) to get around this problem but were
wondering if we really should be using a wheretype of 1 - KEY only when the
table has a primary key value. Is Wheretype only used by the updatecmd
method?

What problems might we hit if we have this set to 1. We are a bit wary that
we might upset something.

Thanks for any help,
Bernie

Re: Cursoradapter wheretype recommendation by Olaf

Olaf
Wed Jan 12 08:28:21 CST 2005

> What problems might we hit if we have this set to 1. We are a bit wary that
> we might upset something.

With "Key and modified" the record to be updated
is searched by both and tableupdate() fails if the
modified fields where modified by someone else
too. If you just look for the Key, update conflicts
of this kind will now show, which might be a disad-
vantage.

Bye, Olaf.



Re: Cursoradapter wheretype recommendation by Thomas

Thomas
Thu Jan 13 04:12:22 CST 2005

Hi,

while sys(3055) might help against the too complex SQL you are also at risk
to run into the statement line too long error.
OTOH you will loose conflict managment when using only key as wheretype.
I'ld reccommend key and timestamp, which wolud only mean a slightly longer
statement
while catching all changes. You might get some false alerts if somebody
changed
other fields than the ones changed in your update: you have to decide from
the character of your app what behaviour is best or even do some further
checks
when handling the "non-update".

my 0.02 EUR

thomas.


"Bernie Beattie" <BernieBeattie@discussions.microsoft.com> schrieb im
Newsbeitrag news:102DE6D7-327B-4D8C-8D38-D3A2A7D79F15@microsoft.com...
> We currently have our cursoradapter class wheretype set to the default of
3 -
> KEY AND MODIFIED. On some files we are getting the error SQL statement
too
> long. We know we can set SYS(3055) to get around this problem but were
> wondering if we really should be using a wheretype of 1 - KEY only when
the
> table has a primary key value. Is Wheretype only used by the updatecmd
> method?
>
> What problems might we hit if we have this set to 1. We are a bit wary
that
> we might upset something.
>
> Thanks for any help,
> Bernie