Home
|
Forums
|
Contact
|
Search
|
Syndication
[login]
[create account]
Tuesday, July 8, 2025
slxdeveloper.com
Home
Search
Contact us
About slxdeveloper
Syndication
Community
Forums
(NEW!)
Newsletter Archive
Members
Your Profile
Submit Article
General
Administration
(6)
OLE DB Provider
Miscellaneous
(2)
Architect
VBScript
(9)
ActiveX Controls
(6)
How To's
(14)
.NET Extensions
(3)
External
OLE DB Provider
(12)
SLAPI (SlgxApi.dll)
SalesLogix COM
(1)
Web
ASP/ASP.NET
(2)
Web Services
Web Client
Downloads
Samples
(17)
Documentation
(7)
Utilities
(18)
Resources
SalesLogix
(3)
Programming
(1)
7/8/2025 1:31:58 AM
slxdeveloper.com Community Forums
The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
Architect Forums - SalesLogix Scripting & Customization
Forum to discuss writing script in Architect plugins for SalesLogix & general SalesLogix customization topics
(for Windows client only)
. View the
code of conduct
for posting guidelines.
Forums RSS Feed
Back to Forum List
|
Back to SalesLogix Scripting & Customization
|
New Thread
View:
Dynamic
Flat
Tree
Search:
Author
Thread: Type Mismatch - All Currency Values?
Dan Carvin
Posts: 227
Type Mismatch - All Currency Values?
Posted: 15 Apr 10 3:44 PM
SLX LAN 7.5.1:
I'm getting a Type Mismatch error on this line:
.Fields("PRICE").Value = .Fields("BASEPRICE").Value - NullToZero(Value)
When debugging in Visual Studio 2008, Value = 450 and the type is Currency. .Fields("BASEPRICE") is part of a recordset from a dynamically created datagrid. The column was created as type 13 (Currency) and the current value is 2400. .Fields("PRICE").Value is also a column type 13. Setting a currency type column to 2400-450 shouldn't be a problem.
I also noticed in VS that the Type property of BASEPRICE is 131. The article at
http://support.microsoft.com/kb/195180
seems to say that calculations of adNumber type produces type mismatch errors.
I'm going to try using cDbl(value) when doing the math, but is this a recent change from Microsoft? I think the original developer of this 3-rd party plug-in would have encountered this.
[
Reply
][
Quote
]
RJ Samp
Posts: 973
Re: Type Mismatch - All Currency Values?
Posted: 15 Apr 10 9:14 PM
Well I just got raked over the calls this AFTERNOON for this kind of stuff......
Anytime I go after an ADO recordset item
1. assume it is null
2. prepare to convert it
and RJ Ledger isn't going to like this.....but I think that cCUR is the way to go, NOT cDBL. This changed in about SLX 7.01 when currency data types in the database went to 15,4 (or thereabouts) instead of double precision float.....
So how about this!
.Fields("PRICE").Value = cCUR(NullToZero(.Fields("BASEPRICE").Value)) - cCUR(NullToZero(Value))
I'll admit that in the old days (before 4PM this afternoon) I would have used cDBL.....
[
Reply
][
Quote
]
Page 1 of 1
You can subscribe to receive a daily forum digest in your
user profile
. View the site
code of conduct
for posting guidelines.
Forum RSS Feed
-
Subscribe to the forum RSS feed to keep on top of the latest forum activity!
slxdeveloper.com is brought to you courtesy of
Ryan Farley
&
Customer FX Corporation
.
This site, and all contents herein, are Copyright © 2025 Customer FX Corporation. The information and opinions expressed here are not endorsed by Sage Software.
code of conduct
|
page cache (param): 7/8/2025 2:23:49 AM