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

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

Turn off Unicode for Exports

Posted By:      Posted Date: April 10, 2011    Points: 0   Category :

Hi,  As I was exporting procs and functions for source control purposes I noticed the default "Script Stored Procedure as ... " is to produce a unicode output.  Even if I exported to New Query Editing Window and copy and pasted to notepad, I still got unicode.  Most of the people I work with didn't even notice it was unicode but I have a hex editor and when I look at it directly I got what you see beloww.  You can see the extra byte next to every ascii character.   We import our procs/functions to Sourcesafe and Sourcesafe definitely didn't like the unicode (would show wierd extra characters when unicode was imported).  I found that at the Tasks .... Generate Scripts level, I could get a true ascii file for the export but I don't like that because I get this approach "... EXEC dbo.sp_executesql  ..." to adding the proc instead of just a straight Create procedure ..... I don't like the extra quotss that EXEC dbo.sp_executesql puts in, although it puts the quotes in accurately.  So can I just tell my Management Studio at some profile level that I don't use Mandarin or Kanji and get my default exports to generate only in ascii?

00000000: FF FE 55 00 53 00 45 00 - 20 00 5B 00 44 00 61 00
00000010: 69 00 6C 00 79 00 5D 00 - 0D 00 0A 00 47 00 4F 00
00000020: 0D 00 0A 00 2F 00 2A 00 - 2A

View Complete Post

More Related Resource Links

Gridview that exports selected rows to Excel

his seems like a messy workaround, but I ended up using two Gridviews - one to display my data and show my checkboxes, and the other which was invisible amd would eventually end up as my Excel spreadsheet.

How to turn off optimistic concurrency checking?


I have run into a problem with optimistic concurrency in my dynamic data application (where all relevant settings are at their default values); when I try to update or delete one of my tables, I see the following error:

 Exception type: ChangeConflictException
 Exception message: Row not found or changed.

I am the only user of my database at the moment, so I can guarantee that the data both exists and has not been changed outside the application!

Various forums have suggested that the way to deal with this is to set the column attributes so that the concurrency checking is disabled; i.e.

[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PropSurname", DbType="NVarChar(255)", UpdateCheck=UpdateCheck.Never)]

However, to do this manually through the Visual Studio designer will take me hours (I have a lot of tables) and if I then change the schema of one of the tables in the DB, won't I then have to do it all again?  I've tried editing the .designer.cs file directly but my changes are subsequently overwritten (as expected).

All suggestions gratefully received!

Ed Graham

How to save Unicode in SQL Server 2005

I am using google transliteration to display the text in Hindi/Tamil

I tried to store the text appear as Hindi from textarea in an nvarchar
field of database (SQL Server 2005) , the text saved as "???????".

After retireving text from the same it display the text as "???????".

Can anyone help me how to store and retrieve the actual data from SQL
Server 2005?

I am using ASP.net,VB.Net and SQL Server 2005

Worldly Windows: Extend The Global Reach Of Your Applications With Unicode 5.0


When using global applications, people want to communicate with others on their terms, in their own languages. Unicode 5.0 brings that ideal closer to reality.

Julie D. Allen, Michael S. Kaplan, Cathy Wissink

MSDN Magazine January 2007

InfoPath: Turn User Input into XML with Custom Forms Using Office InfoPath 2003


Office InfoPath 2003 is a new Microsoft Office product that lets you design your own data collection forms that, when submitted, turn the user-entered data into XML for any XML-supporting process to use. With an InfoPath solution in place, you can convert all those commonly used paper forms into Microsoft Office-based forms and end the cycle of handwriting and reentering data into your systems. Today organizations are beginning to realize the value of the mountains of data they collect every day, how hard it is to access it, and are striving to mine it effectively. InfoPath will aid in the design of effective data collection systems. Here the author shows you how to get started.

Aaron Skonnard

MSDN Magazine September 2003

MSLU: Develop Unicode Applications for Windows 9x Platforms with the Microsoft Layer for Unicode


The Microsoft Layer for Unicode (MSLU) provides Unicode support on Windows platforms that don't provide their own support, including Windows 98, Windows 95, and Windows Me. With MSLU you can write Unicode applications easily for these platforms. MSLU is simple to install, small (even though it wraps more than 400 APIs), and easy on system resources. This article explains the design criteria behind MSLU and how to put the layer to work for you.

Michael Kaplan and Cathy Wissink

MSDN Magazine October 2001

UH-OH! i turned Simple Publishing On - How do i turn it Off?


I have recently deployed a site, where i turned Simple Publishing On in my sitedefinition.


The reason why i turned it On was to get rid of the approval workflow which my client did not need.


However it appear that not only the approval workflow was removed, but also the scheduling feature - therefore i will have to turn it Off again.


It will be easy for me to deploy a new sitedefinition, whith the SimplePublishing set to Off, but a lot of sites has allready been created using the "On" version.


I was thinking about making a small application that enumerated my Webs collection to accomplish that - but i cannot find what properties to use.


Does anybody know how to do this? Or even better - know if there is a way to make a simpler approval workflow?



Reg: Turn on more accessible mode & Skip to main content link message on Infopath2007 browser form



I have a infopath 2007 browser enabled form with c# code behind . The Infopath form is embeded\hosted in to a custom layouts page (.aspx) on MOSS 2007. The issue is when users use keyboard to fill the form, they often use <TAB> & <Enter> keys. So when they are using the tabbing at one location in the form, I have a "Contact selector" field, I enter a name & then hit <TAB> key the focus now comes to "name cheker" I then hit <Enter> key, I hit <TAB> again, the focus now comes to a button named "Accept", I hit <Enter> key & a filed below is populated with the values from user profile service. Now when I hit <TAB> I expect the focus should now come to that automatically populated field below the "Contact selctor". Because Infopath assings the tab order by default form top to bottom & left to right and I havent changed that default tab order.   

But, the focus moves to top of the webpage with a clickable link to "Turn on more accessible mode" I hit tab one more time & the link on top changes to "Skip to main content". This bheaviour does not seem to be happning in other form controls when they hit <Tab>, <Enter>. There are couple of areas on the infopath form where I have such a controls (layed ou

Turn Alerts OFF on a single list


OK, I must be missing something here. 

If I turned on Alerts for one library and then decide I don't want to get the alerts anymore, how do I turn them Off?

How do I set a string in a textbox to unicode?

I have a report requirement to embed the fonts when the report is exported to PDF. The report server is  SSRS 2005 SP3 and upgrading to SSRS2008 is not an option. I have validated that all requirements have been met to ensure embedding have been met except one -  "The characters in the string that has the Font property set are Unicode, not ANSI. No font embedding occurs for ANSI characters." I referenced this article for requirements -  http://technet.microsoft.com/en-us/library/ms159713.aspx . My data is in a dataset field that was populated by a stored procedure. When I examine the rdl the it has a type name of System.String (<rd:TypeName>System.String</rd:TypeName>) How can I ensure that any strings in the report are recognized as unicode? The SSRS PDF renderer must be interpreting the strings as ANSI because that's how they are being rendered in the PDF file preventing embedding. Any assistance would be greatly appreciated!

How to turn on mex for simplified configuration WCF 4.0

I am trying to setup a simplified configuration file and was wondering how to enable MEX for all my services since I don't actually list any services explicitly in the simplified config file. Here is my current config file section for my services: <system.serviceModel>    <behaviors>      <serviceBehaviors>        <behavior>          <serviceMetadata httpGetEnabled="True" />          <serviceDebug includeExceptionDetailInFaults="false" />        </behavior>      </serviceBehaviors>    </behaviors>    <bindings>      <basicHttpBinding>        <binding maxBufferSize="1024" />        <binding maxReceivedMessageSize="1024" />      </basicHttpBinding>    </bindings>  </system.serviceModel>

can not turn on .net framework 3.5 feature in win 7 x64

Hi. when check MS .net framework 3.5.1 in windows feature and press ok,windows give error "An error has occurred,Not all the features were successfully changed." how solve this problem?

Problem to use unicode chars in yahoo mail

Hi i have a problem to send email via smtpClient class to yahoo mail. if i send a unicode email from non-Yahoo account to yahoo mail, it works correctly (display unicode chars correctly without any making change), but when i send from yahoo account to yahoo mail, it does not display characters correctly and i should change it's encoding to UTF8. can anybody help me to work-around this problem ? Please see my previous thread in this link. thanks in advancehttp://www.codeproject.com/KB/codegen/DatabaseHelper.aspx

turn off tag auto close

How do I turn off the feature where closing tags are automatically inserted when an opening tag is typed? I want all auto text turned off. Thanks

SQL Server Unicode Characters in a column

I have an ETL and it fails because of some Unicode Characters. The unicode characters are getting inserted from somewhere in the application and we are still trying to ascertain the source of the same.But till then I need to run a T-SQL Query and find out the rows( I know the column name ) that are causing this problem, modify the data to the correct format and then run the ETL. Would i need to use a cursor? can anyone please advise? It was a bit urgent thus any help would be great! Thanks Nimish

Convert Database ANSI To UNICODE

Hi Friends, I Have DB in 2008 And Now i want That table to convert To SQL 2000. So Can anybody tel how we can convert Data from ANSI to UNICODE and vice a versa. Thanks . 

Change Bitmap Resolution and Turn Black & White

i use this method to resize bitmaps. Bitmap OriginalBM = (Bitmap)Bitmap.FromStream(fileUploader.PostedFile.InputStream); Size newSize = new Size(300, 500); Bitmap Resizebm = new Bitmap(OriginalBM, newSize); Resizebm.Save(HttpContext.Current.Server.MapPath(yourPath) + yourImage, ImageFormat.Jpeg); OriginalBM.Dispose(); My question is how can i Change Bitmap Resolution and Turn Black & White?
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