.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Sandeep Singh
Post New Web Links

Use 1000 separator - using US separator instead of local separator

Posted By:      Posted Date: August 31, 2010    Points: 0   Category :Sql Server
I'm having a bit of trouble to get the proper 1000 separator to show up in my number fields. I have an SQL Server 2008 Developer Edition running on a 2008 Server Enterprise Edition, all set up in English, but the input language is set to de-CH (German (Switzerland)). For my currency fields, I've configured the following number format string: 'Fr.' #,0 According to the Number section in the TextBox properties, the 'Current regional settings' is German (Switzerland) and the preview shows Fr. 12'345 which is exactly what I want to see. However, in the report preview, even after multiple refreshes and even a machine restart, in the report preview, the above number is returned as Fr. 12,345 So, the en-US separator is being used (for de-CH the number means 12 Francs, 345 cents.. not the twelvethousand threehundredfortyfive we're looking for). The only way to get around that is to set the language de-CH on the report itself. Though that begs the question why it picks the proper locale in the textfield properties (and thus returns the proper preview when configuring the number format), but then ignores the locale when running the preview.

View Complete Post

More Related Resource Links

string.Split - not all characters allowed as separator



I am working on a site where I use the Split function on a string.

To make sure I used a separator character that I do not use anywhere in the data I selected the character '£'.

This worked fine in Firefox and Safari, but in IE8 I get an 'Index out of range' error, so apparently the '£' character is not handled correctly.

I changed the separator to ';', and then it works fine.



add a line separator between combobox items using C#.net

i wanna to add a line separator between combo box items using C#.net. how can i do...

Menu Bottom Separator Image

Hello, When I add a static bottom separator image to my menu control, it is displayed in design mode. However, it does not show on the web page when testing. It does not render and displays the white box with red x. My other images are showing fine. I am using Microsoft Visual Web Developer 2010 Express and IE for my browser. Here is my code.<asp:Menu ID="Menu1" runat="server" DataSourceID="SiteMapDataSource2" ForeColor="Black" Font-Names="Cambria" style="font-size: large; font-weight: 700;" Font-Underline="True" StaticBottomSeparatorImageUrl="~/images/separator.jpg"> <StaticHoverStyle BackColor="Silver" /> </asp:Menu> <asp:SiteMapDataSource ID="SiteMapDataSource2" runat="server" showstartingnode=false/> Thanks for your help!

sp_send_dbmail dashes separator line


I need to have an automated process to generate and send out csv data on a set schedule. Using the sp_send_dbmail routine is working great except for one small problem I am having trouble getting around.

I am specifying a query to be run and including the results as a file attachment. The customer wants a csv file with column names.

The attachment always includes a 'separator line' of dashes between the column header and the actual data. Is there any way to eliminate this line of dashes? When I use @query_result_header = 0 flag, it removes the line of dashes, but the column names are also removed as well.

I want to keep the column names, but just remove the line of dashes. Any ideas?


How to create a formatfile that eliminates Quates and changes decimal separator from comma to period



I,m starting to learn sql  2008 R2 express and i have managed to make a bulk insert but when trying to eliminate quates as text qualifiers i,ve seen that i have to make a formatfile. Which application should i use to make this formatfile and how should it look like to eliminate the quates that works as textqualifiers? I also wonder if it is possible to change the comma decimal separator to a period separator so i can use bulk insert for value fields. The file that i would like to bulk insert looks like this.

2010-09-16;"Some Project";"3010";10,15
2010-09-14;"Some Other Project";"4010";500,55552

Best regards


Arne Olsson

WebPartVerb separator


I've got some webparts and I've added my own menu options to the dropdown.  Is there a way to add a seperate between parts of the menu?  If so how??? 

problem with decimal separator



I'm using "," as separator for decimal in my app ( price: for example 12,34 ). 

Everything was fine until I switch from my local machine to server. 

Then I found out, that my prices are shifted left by 2digits ( should be 12,34 but there is 1234,00 ). 

I guess that problem is with separator in "Regional and Languages Options". 

What can I do with this ? 

Thanks in advance 

Implementation of thousand separator for a Textbox


I need a JavaScript code to implement the thousand separator for a Textbox on KeyUp event.

Please help.

String.Split with with tab as separator


I should read the substrings of this file:

1	1	-1738.20118241	6787.03549108	
2	2	-1803.20118241	6759.73549108	
3	3	-2193.20118241	6759.73549108	

I haved used the tab control "\t" as the separator (there is a tab character between the columns):

      Dim separator() As String = {"\t"}
      Console.WriteLine("separator(0) = {0}", separator(0))
        ' Open the file to read from.
        Using sr As StreamReader = File.OpenText(nomeFile)
          Do While sr.Peek() >= 0
            'Dim line As New StringBuilder
            Dim stringline As String
            Dim stringarray As String()
            Dim x, y, canale 

DoubleConverter unable to parse values with thousands separator


While working with the TypeConverter class I ran into a situation where the string value I provide is a valid double but the underlying DoubleConverter is unable to properly process the value. To illustrate:


string x = "1,234.56" ; // is a valid double value
double y = y.Parse(x); // works as expected

but, if you use the TypeConverter it fails...

TypeConverter converter = TypeDescriptor.GetConverter(typeof (double ));
double z = converter.ConvertFromString(x); // will throw a FormatException!

As curiosity got the better of me I started poking around and discovered a subtle difference between the two approaches. Although the underlying DoubleConverter class (which is created via the TypeDescriptor class) ultimately also calls the double.Parse method it seems to forget to turn the NumberStyles.AllowThousands flag on, which is causing the exception. The code below has been taken from the System.ComponentModel

Local variable scoping in C#

In my previous post, Compiler-generated scopes for local variable declarations, I briefly touched on the issue of multiple meanings applied to the same name. In this post, I'll aim to flush out the compiler's rules with regards to binding names in their local scopes.

Compiler-generated scopes for local variable declarations

I was tasked with understanding and fixing a bug on error reporting with foreach iteration variables the other day, and it got me thinking about local variable scoping rules in C# in general. First, the bug.

How to authenticate local user usin ldap or non domain authentication



I created one application, and I need to authenticate local user. This user is the user who is login to his/her Personal Computer.. Main thing his that he/she does not in any DOMAIN... I want NON-DOMAIN authentication.. any how.... please help...

Changing from Local to WCF


I've been handed an application thats connection string implies a local host connection.

I want to make this connection a remote connection, to a database located on a Server.  I want the client and server to be able to communicate with one another remotely, instead of a local connection.

How does one create the Data Service, and establish end points to Server and Client?  Is it as simple as creating a contract (which I have limited knowledge on constructing), between the two locations, setting up the dataservice, security, and ratifying the 'connetions'?

A smidge of insight, please ;-)

Foundations: Workflow Services for Local Communication


This month's column describes how to use WCF for communication between a workflow and a host application in Windows Workflow Foundation 3. This knowledge should help developers with their efforts using WF3 and prepare them for WF4, where WCF is the only abstraction over queues (referred to as "bookmarks" in WF4) that ships with the framework.

Matthew Milner

MSDN Magazine November 2009

Trying to launch a .exe file on my local computer from intranet site.


I have been told I can launch a local program on my PC from my intranet site but it has to be done with Active X or vbscript and not javascript.  I found the following little sample html code that will launch notepad.  However, I cannot figure out how to put this in a button, etc., within my aspx or code behind to execute it.  Does anybody have any idea how to do this?  I have a lot of javascript code I am launching urls with and I have even tried using that but again, I have been told that to do it client side it needs to be vbscript or something like this.  Any ideas?

  <title>Web page that runs EXE files</title>
  <h1>Web page that runs EXE files</h1>
  <p>Click <a href="file:///C:/windows/notepad.exe" class="navbar">here</a>
  to run notepad.exe (Windows XP, ME, 98, 95)</p>
  <p>Click <a href="file:///C:/winnt/notepad.exe" class="navbar">here</a>
  to run notepad.exe (Windows 2000, NT)</p>


Pick up old local users on new server with new local users with same name


Hi, All!

I has old server with name "test", worked with SQL server 2008 and Sharepoint 2007 SP2. There was five users like "user1", "user2", etc. They have content on main page "http://test" and some data at mysite host "http://test:81". Well I create new server with the same name "test", create all users "user1", "user2", etc, then i add them to shared services profiles with the same names like in old server. Then from old server backup content base from MS SQL server for applications on 80 and 81 port, and restore them on new server. Then I make commands "stsadm -o addcontentdb -url http://test -databasename wss_content_80" and "stsadm -o addcontentdb -url http://test:81 -databasename wss_content_81". Then I delete databases which created when i create new web applications from sharepoint central administration. and did iisreset. Well all data and settings picked up, BUT all user ID were old. So question is: how i can compare old users to new? I want to compare old and new users everywhere in DBs wss_content_80 and wss_content_81. Like replace old ID with new ID

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend