Solved

format a double in SQL instruction

Posted on 2002-04-09
9
1,966 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
Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

 
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
 

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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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…

831 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