ADOCE 3.1 and Where Clause 
Author Message
 ADOCE 3.1 and Where Clause

I have an existing database that I am designing forms for and my SQL
statements look pretty standard:

Select test from mytable where test='x'

Now, here's the problem.  Test is a number column and it's of type double.
I get an error any time I try to check this.  I even tried using the LIKE
statement but that errored out too.  I got around it by doing:

Select test from mytable where test < x+1 and test > x-1

Has anyone else come up with a simpler method of doing this?

Mark



Sun, 16 Jan 2005 21:40:20 GMT  
 ADOCE 3.1 and Where Clause
since it's a numeric field, the quotes cause a problem.  You should do

SELECT test FROM mytable WHERE test = 1

or

szSQL = "SELECT test FROM mytable WHERE test = " & x

--
Chris Tacke, eMVP
Windows CE Product Manager
Applied Data Systems
www.applieddata.net


Quote:
> I have an existing database that I am designing forms for and my SQL
> statements look pretty standard:

> Select test from mytable where test='x'

> Now, here's the problem.  Test is a number column and it's of type double.
> I get an error any time I try to check this.  I even tried using the LIKE
> statement but that errored out too.  I got around it by doing:

> Select test from mytable where test < x+1 and test > x-1

> Has anyone else come up with a simpler method of doing this?

> Mark



Sun, 16 Jan 2005 22:13:35 GMT  
 ADOCE 3.1 and Where Clause
Well, I have already tried that, no quotes, single quotes, double quote etc.
The documentation says it produces and error for floating point data types
when  = and <> are used, and apparently for LIKE also.  I just wondered if
there was an easier way around this.

Mark



Quote:
> since it's a numeric field, the quotes cause a problem.  You should do

> SELECT test FROM mytable WHERE test = 1

> or

> szSQL = "SELECT test FROM mytable WHERE test = " & x

> --
> Chris Tacke, eMVP
> Windows CE Product Manager
> Applied Data Systems
> www.applieddata.net



> > I have an existing database that I am designing forms for and my SQL
> > statements look pretty standard:

> > Select test from mytable where test='x'

> > Now, here's the problem.  Test is a number column and it's of type
double.
> > I get an error any time I try to check this.  I even tried using the
LIKE
> > statement but that errored out too.  I got around it by doing:

> > Select test from mytable where test < x+1 and test > x-1

> > Has anyone else come up with a simpler method of doing this?

> > Mark



Sun, 16 Jan 2005 22:50:01 GMT  
 ADOCE 3.1 and Where Clause
What is the data type in the database?

--
Chris Tacke, eMVP
Windows CE Product Manager
Applied Data Systems
www.applieddata.net


Quote:
> Well, I have already tried that, no quotes, single quotes, double quote
etc.
> The documentation says it produces and error for floating point data types
> when  = and <> are used, and apparently for LIKE also.  I just wondered if
> there was an easier way around this.

> Mark



> > since it's a numeric field, the quotes cause a problem.  You should do

> > SELECT test FROM mytable WHERE test = 1

> > or

> > szSQL = "SELECT test FROM mytable WHERE test = " & x

> > --
> > Chris Tacke, eMVP
> > Windows CE Product Manager
> > Applied Data Systems
> > www.applieddata.net



> > > I have an existing database that I am designing forms for and my SQL
> > > statements look pretty standard:

> > > Select test from mytable where test='x'

> > > Now, here's the problem.  Test is a number column and it's of type
> double.
> > > I get an error any time I try to check this.  I even tried using the
> LIKE
> > > statement but that errored out too.  I got around it by doing:

> > > Select test from mytable where test < x+1 and test > x-1

> > > Has anyone else come up with a simpler method of doing this?

> > > Mark



Mon, 17 Jan 2005 05:28:41 GMT  
 ADOCE 3.1 and Where Clause
it's a Number field, type Double

Mark


Quote:
> What is the data type in the database?

> --
> Chris Tacke, eMVP
> Windows CE Product Manager
> Applied Data Systems
> www.applieddata.net



> > Well, I have already tried that, no quotes, single quotes, double quote
> etc.
> > The documentation says it produces and error for floating point data
types
> > when  = and <> are used, and apparently for LIKE also.  I just wondered
if
> > there was an easier way around this.

> > Mark



> > > since it's a numeric field, the quotes cause a problem.  You should do

> > > SELECT test FROM mytable WHERE test = 1

> > > or

> > > szSQL = "SELECT test FROM mytable WHERE test = " & x

> > > --
> > > Chris Tacke, eMVP
> > > Windows CE Product Manager
> > > Applied Data Systems
> > > www.applieddata.net



> > > > I have an existing database that I am designing forms for and my SQL
> > > > statements look pretty standard:

> > > > Select test from mytable where test='x'

> > > > Now, here's the problem.  Test is a number column and it's of type
> > double.
> > > > I get an error any time I try to check this.  I even tried using the
> > LIKE
> > > > statement but that errored out too.  I got around it by doing:

> > > > Select test from mytable where test < x+1 and test > x-1

> > > > Has anyone else come up with a simpler method of doing this?

> > > > Mark



Mon, 17 Jan 2005 12:18:15 GMT  
 ADOCE 3.1 and Where Clause
Mark, Chris,

Did either of you find a solution to this problem?  I am running into
exactly the same error.  I am using ADOCE 3.1 to select records from a
Pocket Access database.  My SELECT statements are very simple, just like
Mark's: match on a single field.  They work on char fields and integer
fields, but not on floating point field (type adDouble).

All SELECTs on these fields raise error 3849, which is not documented
anywhere.  The same queries work fine in ADO against an Access 2000 database
on my desktop, using MDAC 2.6 SP2, so I don't think it's a syntax problem.
Like Mark, I have tried quotes and no quotes, single, double, standing on my
head etc. but nothing works.

Thanks for any help

--

Terry

Terry McKiernan
pinpoint tools

www.pinpointtools.com
We Make ACT! Work Better!

Quote:
> it's a Number field, type Double

> Mark


> > What is the data type in the database?

> > --
> > Chris Tacke, eMVP
> > Windows CE Product Manager
> > Applied Data Systems
> > www.applieddata.net



> > > Well, I have already tried that, no quotes, single quotes, double
quote
> > etc.
> > > The documentation says it produces and error for floating point data
> types
> > > when  = and <> are used, and apparently for LIKE also.  I just
wondered
> if
> > > there was an easier way around this.

> > > Mark



> > > > since it's a numeric field, the quotes cause a problem.  You should
do

> > > > SELECT test FROM mytable WHERE test = 1

> > > > or

> > > > szSQL = "SELECT test FROM mytable WHERE test = " & x

> > > > --
> > > > Chris Tacke, eMVP
> > > > Windows CE Product Manager
> > > > Applied Data Systems
> > > > www.applieddata.net



> > > > > I have an existing database that I am designing forms for and my
SQL
> > > > > statements look pretty standard:

> > > > > Select test from mytable where test='x'

> > > > > Now, here's the problem.  Test is a number column and it's of type
> > > double.
> > > > > I get an error any time I try to check this.  I even tried using
the
> > > LIKE
> > > > > statement but that errored out too.  I got around it by doing:

> > > > > Select test from mytable where test < x+1 and test > x-1

> > > > > Has anyone else come up with a simpler method of doing this?

> > > > > Mark



Fri, 11 Mar 2005 00:34:37 GMT  
 ADOCE 3.1 and Where Clause
After looking back through the thread more carefully, it makes perfect
sense.  Floating  point is always a pain this way, since they rarely if ever
equate to an even integer.  For floats, you really must check for a range
like Mark has in the original post.  LIKE only works with text.

-Chris


Quote:
> Mark, Chris,

> Did either of you find a solution to this problem?  I am running into
> exactly the same error.  I am using ADOCE 3.1 to select records from a
> Pocket Access database.  My SELECT statements are very simple, just like
> Mark's: match on a single field.  They work on char fields and integer
> fields, but not on floating point field (type adDouble).

> All SELECTs on these fields raise error 3849, which is not documented
> anywhere.  The same queries work fine in ADO against an Access 2000
database
> on my desktop, using MDAC 2.6 SP2, so I don't think it's a syntax problem.
> Like Mark, I have tried quotes and no quotes, single, double, standing on
my
> head etc. but nothing works.

> Thanks for any help

> --

> Terry

> Terry McKiernan
> pinpoint tools

> www.pinpointtools.com
> We Make ACT! Work Better!


> > it's a Number field, type Double

> > Mark


> > > What is the data type in the database?

> > > --
> > > Chris Tacke, eMVP
> > > Windows CE Product Manager
> > > Applied Data Systems
> > > www.applieddata.net



> > > > Well, I have already tried that, no quotes, single quotes, double
> quote
> > > etc.
> > > > The documentation says it produces and error for floating point data
> > types
> > > > when  = and <> are used, and apparently for LIKE also.  I just
> wondered
> > if
> > > > there was an easier way around this.

> > > > Mark



> > > > > since it's a numeric field, the quotes cause a problem.  You
should
> do

> > > > > SELECT test FROM mytable WHERE test = 1

> > > > > or

> > > > > szSQL = "SELECT test FROM mytable WHERE test = " & x

> > > > > --
> > > > > Chris Tacke, eMVP
> > > > > Windows CE Product Manager
> > > > > Applied Data Systems
> > > > > www.applieddata.net



> > > > > > I have an existing database that I am designing forms for and my
> SQL
> > > > > > statements look pretty standard:

> > > > > > Select test from mytable where test='x'

> > > > > > Now, here's the problem.  Test is a number column and it's of
type
> > > > double.
> > > > > > I get an error any time I try to check this.  I even tried using
> the
> > > > LIKE
> > > > > > statement but that errored out too.  I got around it by doing:

> > > > > > Select test from mytable where test < x+1 and test > x-1

> > > > > > Has anyone else come up with a simpler method of doing this?

> > > > > > Mark



Fri, 11 Mar 2005 04:20:35 GMT  
 ADOCE 3.1 and Where Clause
OK, thanks I will test it out.  Though I would like to mention, in this
particular case the field did contain the exact value I was searching for,
so it should have still found the records with the = operator.  And in any
case, even if it did not match, I would hardly expect to have an error
raised.  Should just return a recordset with no records.

Oh well, who knows what went on in the minds of the ADOCE dev group. Thanks
for you help.

--

Terry

Terry McKiernan
pinpoint tools

www.pinpointtools.com
We Make ACT! Work Better!


Quote:
> After looking back through the thread more carefully, it makes perfect
> sense.  Floating  point is always a pain this way, since they rarely if
ever
> equate to an even integer.  For floats, you really must check for a range
> like Mark has in the original post.  LIKE only works with text.

> -Chris



> > Mark, Chris,

> > Did either of you find a solution to this problem?  I am running into
> > exactly the same error.  I am using ADOCE 3.1 to select records from a
> > Pocket Access database.  My SELECT statements are very simple, just like
> > Mark's: match on a single field.  They work on char fields and integer
> > fields, but not on floating point field (type adDouble).

> > All SELECTs on these fields raise error 3849, which is not documented
> > anywhere.  The same queries work fine in ADO against an Access 2000
> database
> > on my desktop, using MDAC 2.6 SP2, so I don't think it's a syntax
problem.
> > Like Mark, I have tried quotes and no quotes, single, double, standing
on
> my
> > head etc. but nothing works.

> > Thanks for any help

> > --

> > Terry

> > Terry McKiernan
> > pinpoint tools

> > www.pinpointtools.com
> > We Make ACT! Work Better!


> > > it's a Number field, type Double

> > > Mark


> > > > What is the data type in the database?

> > > > --
> > > > Chris Tacke, eMVP
> > > > Windows CE Product Manager
> > > > Applied Data Systems
> > > > www.applieddata.net



> > > > > Well, I have already tried that, no quotes, single quotes, double
> > quote
> > > > etc.
> > > > > The documentation says it produces and error for floating point
data
> > > types
> > > > > when  = and <> are used, and apparently for LIKE also.  I just
> > wondered
> > > if
> > > > > there was an easier way around this.

> > > > > Mark

> > > > > "Chris Tacke, eMVP" <ctacke[at]applieddata[dot]net> wrote in
message

> > > > > > since it's a numeric field, the quotes cause a problem.  You
> should
> > do

> > > > > > SELECT test FROM mytable WHERE test = 1

> > > > > > or

> > > > > > szSQL = "SELECT test FROM mytable WHERE test = " & x

> > > > > > --
> > > > > > Chris Tacke, eMVP
> > > > > > Windows CE Product Manager
> > > > > > Applied Data Systems
> > > > > > www.applieddata.net



> > > > > > > I have an existing database that I am designing forms for and
my
> > SQL
> > > > > > > statements look pretty standard:

> > > > > > > Select test from mytable where test='x'

> > > > > > > Now, here's the problem.  Test is a number column and it's of
> type
> > > > > double.
> > > > > > > I get an error any time I try to check this.  I even tried
using
> > the
> > > > > LIKE
> > > > > > > statement but that errored out too.  I got around it by doing:

> > > > > > > Select test from mytable where test < x+1 and test > x-1

> > > > > > > Has anyone else come up with a simpler method of doing this?

> > > > > > > Mark



Fri, 11 Mar 2005 22:39:41 GMT  
 ADOCE 3.1 and Where Clause
Actually they very likely are not equal.  If you store the value "1" in the
field, the reality of floating point is that it is almost certain that
exactly 1 is not what is in the field, but instead something that differs
after a dozen or so decimal places.

--
Chris Tacke, eMVP
Windows CE Product Manager
Applied Data Systems
www.applieddata.net


Quote:
> OK, thanks I will test it out.  Though I would like to mention, in this
> particular case the field did contain the exact value I was searching for,
> so it should have still found the records with the = operator.  And in any
> case, even if it did not match, I would hardly expect to have an error
> raised.  Should just return a recordset with no records.

> Oh well, who knows what went on in the minds of the ADOCE dev group.
Thanks
> for you help.

> --

> Terry

> Terry McKiernan
> pinpoint tools

> www.pinpointtools.com
> We Make ACT! Work Better!


> > After looking back through the thread more carefully, it makes perfect
> > sense.  Floating  point is always a pain this way, since they rarely if
> ever
> > equate to an even integer.  For floats, you really must check for a
range
> > like Mark has in the original post.  LIKE only works with text.

> > -Chris



> > > Mark, Chris,

> > > Did either of you find a solution to this problem?  I am running into
> > > exactly the same error.  I am using ADOCE 3.1 to select records from a
> > > Pocket Access database.  My SELECT statements are very simple, just
like
> > > Mark's: match on a single field.  They work on char fields and integer
> > > fields, but not on floating point field (type adDouble).

> > > All SELECTs on these fields raise error 3849, which is not documented
> > > anywhere.  The same queries work fine in ADO against an Access 2000
> > database
> > > on my desktop, using MDAC 2.6 SP2, so I don't think it's a syntax
> problem.
> > > Like Mark, I have tried quotes and no quotes, single, double, standing
> on
> > my
> > > head etc. but nothing works.

> > > Thanks for any help

> > > --

> > > Terry

> > > Terry McKiernan
> > > pinpoint tools

> > > www.pinpointtools.com
> > > We Make ACT! Work Better!


> > > > it's a Number field, type Double

> > > > Mark


> > > > > What is the data type in the database?

> > > > > --
> > > > > Chris Tacke, eMVP
> > > > > Windows CE Product Manager
> > > > > Applied Data Systems
> > > > > www.applieddata.net



> > > > > > Well, I have already tried that, no quotes, single quotes,
double
> > > quote
> > > > > etc.
> > > > > > The documentation says it produces and error for floating point
> data
> > > > types
> > > > > > when  = and <> are used, and apparently for LIKE also.  I just
> > > wondered
> > > > if
> > > > > > there was an easier way around this.

> > > > > > Mark

> > > > > > "Chris Tacke, eMVP" <ctacke[at]applieddata[dot]net> wrote in
> message

> > > > > > > since it's a numeric field, the quotes cause a problem.  You
> > should
> > > do

> > > > > > > SELECT test FROM mytable WHERE test = 1

> > > > > > > or

> > > > > > > szSQL = "SELECT test FROM mytable WHERE test = " & x

> > > > > > > --
> > > > > > > Chris Tacke, eMVP
> > > > > > > Windows CE Product Manager
> > > > > > > Applied Data Systems
> > > > > > > www.applieddata.net



> > > > > > > > I have an existing database that I am designing forms for
and
> my
> > > SQL
> > > > > > > > statements look pretty standard:

> > > > > > > > Select test from mytable where test='x'

> > > > > > > > Now, here's the problem.  Test is a number column and it's
of
> > type
> > > > > > double.
> > > > > > > > I get an error any time I try to check this.  I even tried
> using
> > > the
> > > > > > LIKE
> > > > > > > > statement but that errored out too.  I got around it by
doing:

> > > > > > > > Select test from mytable where test < x+1 and test > x-1

> > > > > > > > Has anyone else come up with a simpler method of doing this?

> > > > > > > > Mark



Fri, 11 Mar 2005 23:05:29 GMT  
 ADOCE 3.1 and Where Clause
I have the answer to this now so maybe this will help someone else.  Thanks
to Mark Kelly and Chris Tacke who pointed me in the right direction.

Basically, this is a known bug but it is very poorly documented, hidden in a
note about the SELECT statement in MS's docs on ADOCE.  The = and <>
operators just don't work with floating-point values.

So I did some testing on the other operators, such as <, >, <= adn >=. These
all work fine. You can thus rewrite your = and <> statements to use a pair
of constraints:

Change:

SELECT * FROM MyTable WHERE MyField = 5

to:

SELECT * FROM MyTable WHERE ((MyField <= 5) AND (MyField >= 5))

And change:

SELECT * FROM MyTable WHERE MyField <> 5

to:

SELECT * FROM MyTable WHERE ((MyField < 5) OR (MyField > 5))

It's a hassle, and the SELECTs probably run slower, but it works.

--

Terry

Terry McKiernan
pinpoint tools

www.pinpointtools.com
We Make ACT! Work Better!


Quote:
> Actually they very likely are not equal.  If you store the value "1" in
the
> field, the reality of floating point is that it is almost certain that
> exactly 1 is not what is in the field, but instead something that differs
> after a dozen or so decimal places.

> --
> Chris Tacke, eMVP
> Windows CE Product Manager
> Applied Data Systems
> www.applieddata.net



> > OK, thanks I will test it out.  Though I would like to mention, in this
> > particular case the field did contain the exact value I was searching
for,
> > so it should have still found the records with the = operator.  And in
any
> > case, even if it did not match, I would hardly expect to have an error
> > raised.  Should just return a recordset with no records.

> > Oh well, who knows what went on in the minds of the ADOCE dev group.
> Thanks
> > for you help.

> > --

> > Terry

> > Terry McKiernan
> > pinpoint tools

> > www.pinpointtools.com
> > We Make ACT! Work Better!


> > > After looking back through the thread more carefully, it makes perfect
> > > sense.  Floating  point is always a pain this way, since they rarely
if
> > ever
> > > equate to an even integer.  For floats, you really must check for a
> range
> > > like Mark has in the original post.  LIKE only works with text.

> > > -Chris



> > > > Mark, Chris,

> > > > Did either of you find a solution to this problem?  I am running
into
> > > > exactly the same error.  I am using ADOCE 3.1 to select records from
a
> > > > Pocket Access database.  My SELECT statements are very simple, just
> like
> > > > Mark's: match on a single field.  They work on char fields and
integer
> > > > fields, but not on floating point field (type adDouble).

> > > > All SELECTs on these fields raise error 3849, which is not
documented
> > > > anywhere.  The same queries work fine in ADO against an Access 2000
> > > database
> > > > on my desktop, using MDAC 2.6 SP2, so I don't think it's a syntax
> > problem.
> > > > Like Mark, I have tried quotes and no quotes, single, double,
standing
> > on
> > > my
> > > > head etc. but nothing works.

> > > > Thanks for any help

> > > > --

> > > > Terry

> > > > Terry McKiernan
> > > > pinpoint tools

> > > > www.pinpointtools.com
> > > > We Make ACT! Work Better!


> > > > > it's a Number field, type Double

> > > > > Mark
> > > > > "Chris Tacke, eMVP" <ctacke[at]applieddata[dot]net> wrote in
message

> > > > > > What is the data type in the database?

> > > > > > --
> > > > > > Chris Tacke, eMVP
> > > > > > Windows CE Product Manager
> > > > > > Applied Data Systems
> > > > > > www.applieddata.net



> > > > > > > Well, I have already tried that, no quotes, single quotes,
> double
> > > > quote
> > > > > > etc.
> > > > > > > The documentation says it produces and error for floating
point
> > data
> > > > > types
> > > > > > > when  = and <> are used, and apparently for LIKE also.  I just
> > > > wondered
> > > > > if
> > > > > > > there was an easier way around this.

> > > > > > > Mark

> > > > > > > "Chris Tacke, eMVP" <ctacke[at]applieddata[dot]net> wrote in
> > message

> > > > > > > > since it's a numeric field, the quotes cause a problem.  You
> > > should
> > > > do

> > > > > > > > SELECT test FROM mytable WHERE test = 1

> > > > > > > > or

> > > > > > > > szSQL = "SELECT test FROM mytable WHERE test = " & x

> > > > > > > > --
> > > > > > > > Chris Tacke, eMVP
> > > > > > > > Windows CE Product Manager
> > > > > > > > Applied Data Systems
> > > > > > > > www.applieddata.net



> > > > > > > > > I have an existing database that I am designing forms for
> and
> > my
> > > > SQL
> > > > > > > > > statements look pretty standard:

> > > > > > > > > Select test from mytable where test='x'

> > > > > > > > > Now, here's the problem.  Test is a number column and it's
> of
> > > type
> > > > > > > double.
> > > > > > > > > I get an error any time I try to check this.  I even tried
> > using
> > > > the
> > > > > > > LIKE
> > > > > > > > > statement but that errored out too.  I got around it by
> doing:

> > > > > > > > > Select test from mytable where test < x+1 and test > x-1

> > > > > > > > > Has anyone else come up with a simpler method of doing
this?

> > > > > > > > > Mark



Sat, 12 Mar 2005 03:36:29 GMT  
 ADOCE 3.1 and Where Clause


Quote:
> Actually they very likely are not equal.  If you store the value "1" in
the
> field, the reality of floating point is that it is almost certain that
> exactly 1 is not what is in the field, but instead something that differs
> after a dozen or so decimal places.

I don't follow you there!
IF the values are IEEE floating point numbers, then you are talking the
number 2 to the zeroth power. That is perfectly defineable without any
rounding errors.
The numbers 1, 2, 4, 8 and so on to the resolution (bits) of the exponent
are clearly defineable. They only takes one bit of the mantissa.
The numbers 0.5, 0.25, 0.125 etc. are also clearly defineable just using one
bit mantissa and a negative exponent.
It is the rest of the numbers that might be a hassle as they are very often
not clearly representable. A fairly simple number, such as .3 is quite
difficult to define using a finite size mantissa.

And of course, you very quickly gets rounding errors when calculating.

But as long as you are talking the value of 1 (as opposed to the value
(1/3)*3)), i must disagree.

Anyway, this doesn't change the fact that it is always a good idea to
compare floats in something like this way:

If MyCheckValue<SomeValue+LeastDifference And
MyCheckValue>SomeValue-LeastDifference Then
instead of
If MyCheckValue=SomeValue Then
...

Best regards,

Keld Laursen



Sat, 12 Mar 2005 05:19:56 GMT  
 ADOCE 3.1 and Where Clause
Yes, the value "1" or "2" is a bad example (see my other post).  But for any
floating point field, you should never rely on equality comparisons
returning what you expect.  Always use range comparisons.

--
Chris Tacke, eMVP
Windows CE Product Manager
Applied Data Systems
www.applieddata.net


Quote:


> > Actually they very likely are not equal.  If you store the value "1" in
> the
> > field, the reality of floating point is that it is almost certain that
> > exactly 1 is not what is in the field, but instead something that
differs
> > after a dozen or so decimal places.

> I don't follow you there!
> IF the values are IEEE floating point numbers, then you are talking the
> number 2 to the zeroth power. That is perfectly defineable without any
> rounding errors.
> The numbers 1, 2, 4, 8 and so on to the resolution (bits) of the exponent
> are clearly defineable. They only takes one bit of the mantissa.
> The numbers 0.5, 0.25, 0.125 etc. are also clearly defineable just using
one
> bit mantissa and a negative exponent.
> It is the rest of the numbers that might be a hassle as they are very
often
> not clearly representable. A fairly simple number, such as .3 is quite
> difficult to define using a finite size mantissa.

> And of course, you very quickly gets rounding errors when calculating.

> But as long as you are talking the value of 1 (as opposed to the value
> (1/3)*3)), i must disagree.

> Anyway, this doesn't change the fact that it is always a good idea to
> compare floats in something like this way:

> If MyCheckValue<SomeValue+LeastDifference And
> MyCheckValue>SomeValue-LeastDifference Then
> instead of
> If MyCheckValue=SomeValue Then
> ...

> Best regards,

> Keld Laursen



Sat, 12 Mar 2005 05:48:01 GMT  
 ADOCE 3.1 and Where Clause


Quote:
> Yes, the value "1" or "2" is a bad example (see my other post).  But for
any
> floating point field, you should never rely on equality comparisons
> returning what you expect.  Always use range comparisons.

And one of my points, probably lost in the somewhat lengthy post, were that
if those values were calculated values, you could very well be right, also
on the "neat" numbers.

Keld Laursen



Sat, 12 Mar 2005 14:06:01 GMT  
 ADOCE 3.1 and Where Clause
So it seems that we agree to agree.  :)

--
Chris Tacke, eMVP
Windows CE Product Manager
Applied Data Systems
www.applieddata.net


Quote:


> > Yes, the value "1" or "2" is a bad example (see my other post).  But for
> any
> > floating point field, you should never rely on equality comparisons
> > returning what you expect.  Always use range comparisons.

> And one of my points, probably lost in the somewhat lengthy post, were
that
> if those values were calculated values, you could very well be right, also
> on the "neat" numbers.

> Keld Laursen



Sat, 12 Mar 2005 21:37:20 GMT  
 
 [ 14 post ] 

 Relevant Pages 

1. ADOCE 3.1 trouble

2. Getting ADOCE 3.1 installed on an old iPAQ 3650 Pocket PC 2002

3. ADOCE 3.1 - System Hang

4. SQLCE2.0 and ADOCE 3.1 Connection Property

5. ADOCE 3.1

6. How to install MS ADOCE 3.1 ??

7. ADOCE 3.1 Access Specifications

8. SEEK Method in ADOCE 3.1

9. ADOCE 3.1 PROBLEM IN EMULATOR AS TARGET DEVICE

10. Install Wizard only sees ADOCE 3.0 (not 3.1)

11. ppc 2002,evb 3.0,adoce 3.1 Can't create object

12. Does ADOCE 3.1 do weird things to eVB?

 

 
Powered by phpBB® Forum Software