[Oledb-dev] Update support
Konstantin Izmailov
kizmailov at gmail.com
Mon Apr 24 06:08:04 UTC 2006
Victor,
I haven't looked at it yet again. However, I have a guess why this is
happening. Consider the UPDATE statement ADO passes to PgOleDB:
update testtab set strcol=?, boolcol=? where strcol=? and boolcol=?
Strictly speaking if boolcol value before change was NULL, fourth parameter
in the query is NULL and statement must look like:
update testtab set strcol=?, boolcol=? where strcol=? and boocol is null
The query transformation must be done by the provider (if we add parser and
query builder).
The reason I cannot reproduce the issue could be in the data in my boolcol.
All values in my testtab are not NULL... Or I changed smth in the PgOleDB
that fixed the problem (no surprise after the extensive experiments).
Regards
Konstantin
P.S. did you use: #import "msado15.dll" no_namespace rename( "EOF", "adoEOF"
) ?
On 4/23/06, Victor Snezhko <snezhko at indorsoft.ru> wrote:
>
> "Konstantin Izmailov" <kizmailov at gmail.com> writes:
>
> > Victor,
> > I was not able to reproduce it. Please take a look at attached test
> > app (boolupdate.cpp) and PgCommand.cpp with your code merged (it
> > could be different from what we currently have in CVS). I also added
> > the following to
>
> Hi, Konstantin,
>
> I'm able to reproduce it with true boolean value instead of false:
>
> > if (!pRecordset->GetadoEOF ())
> > {
> > _variant_t vAccount(L"abc");
> > _variant_t vTestbool(false);
>
> Please use true here to reproduce.
>
> With my script I don't experience the problem with false value.
> Problem also disappears if I exchange PutValues below - place bool
> field assignment in front of string one.
>
> P.S.: I imported msado15.dll, as ADO programmer's guide suggests, but
> it doesn't contain GetadoEOF, I commented it out for you testbool.cpp
> to compile.
>
> --
> WBR, Victor V. Snezhko
> E-mail: snezhko at indorsoft.ru
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://pgfoundry.org/pipermail/oledb-devel/attachments/20060424/734ac73e/attachment.html
More information about the Oledb-devel
mailing list