Re: parameterized queries: 3 problems



Hi Stephen,

thank you for that really fast replay to my very long posting.
Reading the Execute API documentation I only saw "optional",
so I used &vtMissing as usual. When I change the RecordsAffected
parameter to NULL, it works as expected and all bugs vanish.
I can only guess that Execute changed my vtMissing variant
and that resulted in problems for every later usage of vtMissing.

I will now change all calls to Execute to use NULL as parameter
RecordsAffected. I will also change all code that passed
&vtMissing as non-const to use a copy of vtMissing.

Thank you also for that tip with long/int. I did a short test
and will change that, too. I will also change all calls when
I used a short as an index (e.g. rs->Fields->Item[(short)0]->Value)
to use a long as an index. I hated to use the short cast, but
int did not work.

An last but not least I'll take a look at the links you provided.

Kind regards,
Klaus


.