Solved

format a double in SQL instruction

Posted on 2002-04-09
9
1,964 Views
Last Modified: 2012-06-27
I want to retrieve some numbers(double) from a table by SQL and populate a MSHFlexGrid with them but instead of apear with a comma (###,##) it apears with a dot (###.##)
Is the problem with the SQL instruction or the MSHFlexGrid
Can I solve it with a SQL format?

Thanks
0
Comment
Question by:asimoes
9 Comments
 
LVL 44

Accepted Solution

by:
bruintje earned 200 total points
ID: 6929287
Hi asimoes,

-You could check your ODBC settings if you use that got no dialog here bu look at the translation of numbers/chars
-OR and most probable look at the client settings in your regional settings panel

:O)Bruintje
0
 
LVL 5

Expert Comment

by:kcm76
ID: 6929353
or...
in the regional setting change the currency format.

kcm
0
 
LVL 43

Expert Comment

by:TimCottee
ID: 6929426
bruintje has the right idea I think, I would imagine that you need to check the box which says "Use Regional Settings for dates and numbers" or something like that.
0
 
LVL 2

Expert Comment

by:telebasics
ID: 6929869
You can force the return value's (dont know the datagrid but...) by using the format command

mynr = format(theval,layout)

these mostly only work fine with date or currency format, time is also good.
Bu numbers are more display side then anything else.

Ofcourse it also only works when converting the number or currency etc to a string to display or something.

0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

Author Comment

by:asimoes
ID: 6930841
I've seen my regional settings and they are fine.
FOR NUMBER
Decimal symbol=,
Digites after decimnal=2
digit group symbol=.
FOR CURRENCY
c.symbol=€
Decimal symbol=,
Digites after decimnal=2
digit group=123.456.789

So I thing it's not this.
Note that just when the values enter in the flexgrid they assume the "123.23" format instead of the "123,34" one.
Because if before I see those values they apear in the correct format.
How can I go to my ODBC settings to check.

Thanks
0
 

Author Comment

by:asimoes
ID: 6931333
I've seen my regional settings and they are fine.
FOR NUMBER
Decimal symbol=,
Digites after decimnal=2
digit group symbol=.
FOR CURRENCY
c.symbol=€
Decimal symbol=,
Digites after decimnal=2
digit group=123.456.789

So I thing it's not this.
Note that just when the values enter in the flexgrid they assume the "123.23" format instead of the
"123,34" one.
Because if before I see those values they apear in the correct format.
How can I go to my ODBC settings to check.

Thanks
0
 
LVL 44

Expert Comment

by:bruintje
ID: 6931371
Hi asimoes,

i was willing to get into more detail if needed, but why the C?? please don't accept and grade prematurly if you're not completely satisfied with a comment

that's why we comment instead of answer, to get as much input as you need to solve your problem...

a grade doesn't cost you any point extra, but it really ruins my record and that wasn't needed since it was only a comment

:O)Bruintje
0
 

Expert Comment

by:ComTech
ID: 6931493
Hello asimoes,

a little advice on accepting answers here at EE.  Please read the below article from EE Users Guide.  and also, out of respect, when answering, please leave comments after accepting, that would help greatly.

How Do I Know What Grade to Give?

Although we use an A-C scale here at Experts Exchange, it works differently than, say, school grades. If one or more Experts' proposals are accepted as answers, they should usually be given an A or B grade, since they have taken the time to provide you with a working solution. If a possible solution is incomplete - ask for clarification or details before accepting the answer and grading it.

People should not be given lower grades because of incorrect grammar or because you just accepted their answer or comment to close the question. Keep in mind, your question and any follow-up comments should be focused so that there can be a specific answer. The following is a good guideline to follow when grading:

A: The Expert(s) either provided you with a thorough answer or they provided you with a link to information
that thoroughly answered your question. An "A" can also be given to any answer that you found informative or enlightening beyond the direct question that you asked.

B: The Expert(s) provided an acceptable solution, or a link to an acceptable solution, that you were able to use, although you may have needed a bit more information to complete the task.

C: Because Experts' reliability are often judged by their grading records, many Experts would like the opportunity to clarify if you have questions about their solutions. If you have given the Expert(s) ample time to respond to your clarification posts and you have responded to each of their posts providing requested information; or if the answers, after clarification, lack finality or do not completely address the issue presented, then a "C" grade is an option. You also have the option here of just sking Community Support to delete the question.

Remember, the Expert helping you today is probably going to be helping you next time you post a question. Give them a fair chance to earn an 'Excellent!' grade and they'll provide you with some amazing support.


Regards,
ComTech
CS Admin @ EE

btw-As there is no explination from you as to why a C was given, I am compelled to change the Grade.  And as bruintje has pointed out, the collobration process could have gone much further to help you.
0
 

Author Comment

by:asimoes
ID: 6931658
I´m very sorry.
I'll won't do it again.

0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

932 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now