Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

VB SP5 behaviors different from SP4

Posted on 2002-05-07
5
Medium Priority
?
201 Views
Last Modified: 2012-06-27
I recently upgraded to VB SP5 from SP4.

However, occationally, I found there are some functions changed.

Give you an example:
if rsEntry("Amount") = $102000.25
( rsEntry is an ADODB.Recordset object )

on VB SP4:
Code ' if rsEntry!Amount < ("99999.99")'
would return FALSE

But on VB SP5:
Code ' if rsEntry!Amount < ("99999.99")' returns TRUE

I have to use ' if rsEntry!Amount < CCur("99999.99")' to get the correct value 'FALSE'

I couldn't have any luck from internet, and on microsoft's web site it's all about .NET.

Have anybody seen similar problems, or had information related to VB SP5 according to the function changes.

Any idea ?

Thanks.
0
Comment
Question by:cannon_zhou
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 18

Expert Comment

by:bobbit31
ID: 6995140
what is the datatype of rsEntry("Amount")

from what i see, it is a String (are you storing the $)
if so, i'd suggest against that and just store it as a number.
0
 
LVL 53

Expert Comment

by:Ryan Chong
ID: 6995879
You should include the CCur Function in your comparison as the compare value is a String.
0
 

Author Comment

by:cannon_zhou
ID: 6996629
The datatype of rsEntry("Amount") is a currency field.
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 7722379
Hi cannon_zhou,
It appears that you have forgotten this question. I will ask Community Support to close it unless you finalize it within 7 days. I will ask a Community Support Moderator to:

    Refund points and save as a 0-pt PAQ.

cannon_zhou, Please DO NOT accept this comment as an answer.
EXPERTS: Post a comment if you are certain that an expert deserves credit.  Explain why.
==========
DanRollins -- EE database cleanup volunteer
0
 

Accepted Solution

by:
SpideyMod earned 0 total points
ID: 7780175
per recommendation

SpideyMod
Community Support Moderator @Experts Exchange
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses

718 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question