Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Monday, May 20, 2024 
 
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!
 Data & Imports Forums - T-SQL & Queries
Forum to discuss general T-SQL questions and help with queries related to SalesLogix data. View the code of conduct for posting guidelines.
Forums RSS Feed


 Back to Forum List | Back to T-SQL & Queries | New ThreadView:  Search:  
 Author  Thread: Trouble with the Money field type
Lou
Posts: 81
 
Trouble with the Money field typeYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 13 Feb 08 10:59 AM
Using SalesLogix v6.2.6

I run a SELECT statement for the "Balance" field, which is a money type. It is stored in the database as "740.0000" but SalesLogix displays something totally different each time I run the statement. I've gotten alternating values of "197032483697.4592" and "168884986026.3936."

Can someone explain what may be happening? I need to get the "740" and not those other crazy values!

Thanks in advance for looking in to this!

[Reply][Quote]
Phil Parkin
Posts: 819
Top 10 forum poster: 819 posts
 
Re: Trouble with the Money field typeYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 13 Feb 08 2:11 PM
Which balance figure are you referring to?

Please post the SQL that you are running to return these results.

P
[Reply][Quote]
Lou
Posts: 81
 
Re: Trouble with the Money field typeYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 13 Feb 08 2:39 PM
My statement reads:

SELECT BALANCE FROM JDE_ARSUMMARY

This statement is stored in a variable, which is used in a recordset object in my SalesLogix script. The BALANCE field is a money type.
[Reply][Quote]
Phil Parkin
Posts: 819
Top 10 forum poster: 819 posts
 
Re: Trouble with the Money field typeYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 13 Feb 08 3:28 PM
This is very difficult to troubleshoot without knowing more information.

When you have the balance figure, what are you trying to do with it? Is is just something that you are displaying on an account form (for example)?

SELECT BALANCE FROM JDE_ARSUMMARY where AccountID = 'zzzzzzzzzzzz'

Are you displaying the result using a text box? Have you set the format type property of the text box?
[Reply][Quote]
Lou
Posts: 81
 
Re: Trouble with the Money field typeYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 13 Feb 08 4:00 PM
The project contains a check list box that lists record numbers and account balances. When the user checks a box, an e-mail preview is generated. The e-mail message is displayed in a SalesLogix browser control; it contains the record number, the balance, and other HTML formatting. The user will click a button to send multiple e-mails to their recipients. I believe SalesLogix may be converting the money field and expressing it in another format, but I may be wrong. Here is the part of the code that first uses the BALANCE field:

_________________________________________

Dim strSQL, rsJDEARSummary, nrecords

strSQL = "SELECT JDE#, BALANCE " &_
"FROM JDE_ARSUMMARY " &_
"WHERE AG_61TO90 > 0 " &_
"ORDER BY JDE#"

'Get the number of JDE records
Set rsJDEARSummary = Application.CreateObject("ADODB.Recordset")
rsJDEARSummary.ActiveConnection = Application.GetNewConnection
rsJDEARSummary.Open(strSQL)
nRecords = rsJDEARSummary.RecordCount

'Only show interface if there is at least one record
If nRecords > 0 Then
clbColEmail.Clear

For i = 0 To nRecords - 1
clbColEmail.Items.Add "JDE: " & Trim(rsJDEARSummary("JDE#").Value) & ", " &_
"Balance: " & Trim(rsJDEARSummary("Balance").Value)
Next
_________________________________________
[Reply][Quote]
Phil Parkin
Posts: 819
Top 10 forum poster: 819 posts
 
Re: Trouble with the Money field typeYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 13 Feb 08 4:08 PM
So the format of the numbers is wrong in the clb?

Have you tried going into debug and inspecting the value of rsJDEARSummary("Balance").Value as the resultset is traversed?

At least, then, you can reassure yourself that the data retrieval part is working correctly.
[Reply][Quote]
Lou
Posts: 81
 
Re: Trouble with the Money field typeYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 14 Feb 08 7:36 AM
The format of the number was wrong before it gots to the clb. I tried changing the field type to decimal, and then everything worked fine. I switched it back to money, and I still get the results I want. I still don't know what was going on or why this worked, but I'm statisfied now. Thanks for stepping in and trying to help, Phil.
[Reply][Quote]
Phil Parkin
Posts: 819
Top 10 forum poster: 819 posts
 
Re: Trouble with the Money field typeYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 14 Feb 08 3:29 PM
No problem. Sounds like one of those "Hmmmm??" moments - I have them all the time
[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 © 2024 Customer FX Corporation. The information and opinions expressed here are not endorsed by Sage Software.

code of conduct | Subscribe to the slxdeveloper.com Latest Article RSS feed
   
 
page cache (param): 5/20/2024 5:38:30 PM