Re: Nz Problem in ADO execute
- From: "Random" <srr17@xxxxxxxxxxx>
- Date: 20 Mar 2006 23:17:32 -0800
Thanks for the prompt reply.
I have done all sorts of testing, and I believe there is a problem with
the way in which Nz is interpreted.
As an example if I do:
strSQL = "UPDATE EZI_SCHEDULE " _
& "SET ESC_FINANCED_AMOUNT = Nz(ESC_FINANCED_AMOUNT,60)
" _
& "WHERE ESC_SCHEDULE_ID = '" & strSCH & "';"
The code (and Nz) works as expected, but as soon as I introduce a
mathematical function (see below) the Nz(ESC_FINANCED_AMOUNT,60) always
evaluates to 0:
strSQL = "UPDATE EZI_SCHEDULE " _
& "SET ESC_FINANCED_AMOUNT = Nz(ESC_FINANCED_AMOUNT,60)
+15 " _
& "WHERE ESC_SCHEDULE_ID = '" & strSCH & "';"
Likewise if I use Docmd.runsql instead of cnn.execute, teh code works
correctly.
I cannot find any other explanation, other than an error in the way Nz
is treated by ADO.
Regards
Steve
.
- Follow-Ups:
- Re: Nz Problem in ADO execute
- From: TC
- Re: Nz Problem in ADO execute
- From: Brendan Reynolds
- Re: Nz Problem in ADO execute
- References:
- Nz Problem in ADO execute
- From: Random
- Re: Nz Problem in ADO execute
- From: TC
- Nz Problem in ADO execute
- Prev by Date: Re: Using Access to create dynamic chart in Excel
- Next by Date: Re: Input Mask into Text Box - Phone Number - Help!
- Previous by thread: Re: Nz Problem in ADO execute
- Next by thread: Re: Nz Problem in ADO execute
- Index(es):