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

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

sql server 2008 not showing and inserting unicode characters!

Posted By:      Posted Date: October 23, 2010    Points: 0   Category :Sql Server


i am inserting unicode data into sql server 2008 , but my script file is showing a box instead of the actual unicode character.i.e if i have a text file (a notepad file saved with unicode encoding) and i copy paste any unicode character from there to my sql server script file , it shows a box instead of the unicode character.

and when i insert the data like this , the ? character is inserted instead of the box.

what to do now ?

View Complete Post

More Related Resource Links

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

Inserting XML into SQL Server 2008 table



I'm generating an XML file from front end, I'm using 4 Data Transfer Object classes comprising of full details of a Customer like CustomerPersonalInfoDTO.cs, CustomerLoginInfoDTO.cs, CustomerPreviousAddressDTO.cs, CustomerAddressInfoDTO.cs.

Everything is fine and XML is also generated, But the problem is with SQL Server Stored Procedure. I've created a table Customer with 20 columns.

CustomerPersonalInfoDTO.cs holds 10 customer fields and CustomerLoginInfoDTO.cs holds another 10 customer fields (total =20)..

I now need to insert at a time these 20 FIELDS into SQL server Customer Table. My XML Data will look like the below:

<?xml version="1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" ?> 
- <CustomerDTO>

- <CustomerPersonalInfo>

SQL Server 2008 R2 Disk Usage report showing incorrect data file


When I go to ANY database (System, AdventureWorks*, user) in Managemant Studio, I right-click on the db, select Reports, select Standard Reports, and select Disk Usage.  The disk usage report shows the correct db on top, but always only shows AdventureWorks_Data.mdf when I expand Disk Space Used by Data Files section.  This happens to any db I try.  When I look at Database Properties/Files for that database, the logical and physical file names are correct.

Since the correct files appear in Database Properties/Files, I'm hoping it's just a bug in the report.  Same thing happens if I run a Disk Usage by Table report for ANY database,  The tables for AdventureWorks always only appear,

Thanks,  Mike

Inserting and updating 2 tables in sql server 2008 from 2 worksheets in Excel


hi all,

        I have an excel sheet with 2 tabs and has data in those 2 sheets(sheet1, sheet2) which correspond to different tables in the same database. This excel sheet gets updated daily, I am wiriting a console app( which will later be a batch build). I have to  insert the data from the excel sheet to corresponding tables (table1, table2,table3) in database when i run it and and also if the table has the same data already present it should ignore and if there are any modifications done the data it should update the table. I know we can do this using ado.net or LINQ, I am a little new to database based programming ..so any help is more appreciated. I have already tried googling but colud not find the perfect solution.

Working with unicode (SQL SERVER 2008, ADO, BCB6)


I have a problem inserting Unicode text into sql server database table.

Field type is NVARCHAR, selecting works fine, but not insert

Here is my code:


I use TntMemo1 to ensure the parameter is unicode.

Result is question marks.

Please help



SQL Server 2008 enterprise upgrade failed: Illegal characters in path.


My production upgrade from SQL Server 2005 to 2008 just went down. This is a single x64 server installation the log reported the strange set of problems:


2011-04-13 10:14:48 AS: Result: (Utility) Success
2011-04-13 10:14:48 AS: Action: Set Admin Rights For Folder(F:\SSAS\AS_TEMP\|)
2011-04-13 10:14:48 Slp: Sco: Attempting to set directory full path
2011-04-13 10:14:48 Slp: Sco: Attempting to normalize directory path F:\SSAS\AS_TEMP\|
2011-04-13 10:14:48 Slp: Prompting user if they want to retry this action due to the following failure:
2011-04-13 10:14:48 Slp: ----------------------------------------
2011-04-13 10:14:48 Slp: The following is an exception stack listing the exceptions in outermost to innermost order
2011-04-13 10:14:48 Slp: Inner exceptions are being indented
2011-04-13 10:14:48 Slp: 
2011-04-13 10:14:48 Slp: Exception type: Microsoft.SqlServer.Configuration.Sco.ScoException
2011-04-13 10:14:48 Slp:   Message: 
2011-04-13 10:14:48 Slp:     Illegal characters in path.
2011-04-13 10:14:48 Slp:   Data: 
2011-04-13 10:14:48 Slp:    DisableRetry = true
2011-04-13 10:14:48 Slp:   Inner exc

Sql Server 2008 Tutorials

This Link Provides total Sql Server 2008 Tutorials

Seven reasons to care about SQL Server 2008 R2

Microsoft begins to fully realize its vision of SQL Server as an information platform and not "just" a database. Hence the main theme for this release -- at least according to Microsoft -- is self-service BI. The PowerPivot plug-ins for Excel 2010 and SharePoint 2010 are easily going to make the biggest splash of all the new features, not least because they're the most complete. But then, SQL Server 2008 R2 isn't strictly necessary for PowerPivot for Excel, which works with plenty of other data sources.

Error upgrading SQL Server 2008


i was normally using VS2005 and SQL server 2005...

i upgraded to SQL Server 2008... and then...

i could not build my project anymore... because of this error:

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 
Exception Details: System.IO.FileNotFoundException: The specified module could not be found. (Exception from HRESULT: 0x8007007E)
Source Error: 

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

sql server 2008 adventureworks database


dear Friends

For my MCTS 70 -433 examination, I recently installed sql server 2008 and installed the sample databases too. but my issue is, in that book they have mentioned a database called "AdventureWorks2008" and the nice thing is I don't have a such a database with me in my sql server 2008. 

And the query is 

-- MERGE Statement
USE AdventureWorks2008
MERGE INTO	Sales.SalesOrderDetailHistory AS SODH
USING Sales.SalesOrderDetail AS SOD
ON SODH.SalesOrderID = SOD.SalesOrderID
AND SODH.SalesOrderDetailID = SOD.SalesOrderDetailID
INSERT (LineTotal, SalesOrderID, SalesOrderDetailID, CarrierTrackingNumber, OrderQty
, ProductID, SpecialOfferID, UnitPrice, UnitPriceDiscount
, rowguid, ModifiedDate, Cancelled)
VALUES(LineTotal, SalesOrderID, SalesOrderDetailID, CarrierTrackingNumber, OrderQty
, ProductID, SpecialOfferID, UnitPrice, UnitPriceDiscount
, rowguid, ModifiedDate, DEFAULT)
UPDATE SET SOHD.Cancelled = 'True'
OUTPUT $action , inserted.* ;	

Please help me to overcome this issue and let me know where can I download that database too.

Thanking you

happy Coding

PostGreSQL to sql server 2008?



I am new to POSTGREsql.

I have a database built in POSTGresql and I have to migrate it to SQL SERVER 2008.

How can I do that?



Word Automation Issue in Windows Server 2008 Hosting



The problem I am posting here is that I was facing nearly 2 weeks around. Any body comes with this stuff please help.

Word Automation in sample ASP.NET(C#) application.

I am using Microsoft.Office.Inetrop.Word Assembly for automation. Here I am reading a XXX.dot template file and fill the contents with dynamic data.

When i am executing my code in localhost:someportnumber the automation is working fine and I could get expected result and when I am hosting in my inetmgr(Windows XP is my OS) it is also working fine.

But the problem is that when I am hosting in my production server(Windows Server 2008 Standard Edition) I am not able to perform automation and results in the following error.

Data: System.Collections.ListDictionaryInternal
Message: Word has encountered a problem.
Source: Microsoft Word

The code gets failed in the following line:

ApplicationClass wordApp = new Microsoft.Office.Interop.Word.ApplicationClass();

Document wordDoc = wordApp.Documents.Add(ref oTemplate, ref oFalse, ref oMissing, ref oMissing); // Error in this line

I cannot able to proceed further. Can anybody please help me in solving this issue?

Thank you.

With Regards,


No ASPNET User in Windows Server 2008?


I have been looking everywhere online regarding this, but have not found a clear answer.


I have an ASP.Net app running on Windows Server 2008, it's basically a reporting app using Crystal Reports. I have encountered a roadblock in regards to rendering some pages. When I run the app in Visual Studio(on the same 2008 machine) everything works perfectly. Yet when I publish it and run it live the reports will not display correctly, I get a message saying Failed to render page.


I looked this error up in the Crystal Reports website and the fixes they have there refer to giving the windows "aspnet" user full access rights to certain folders on the machine. I would be happy to do this, however there is no aspnet user in Windows Server 2008.


I installed the server and set its role to be Web Server. I also checked all the options regarding ASP.Net and IIS 6 compatibility. Yet there is no ASPNET username anywhere.


Did I set the server up wrong? or do I have to do something within ASP.Net to  create this user and then give it rights? 

Not working on Windows Server 2008




I had the CSS friendly adapters working great on our old server (windows server 2003 - 32bit) and now we have moved to a 64 bit environment and now I can not get the CSS friendly adapters to work.

We are using SharePoint 2007.

Is there another work thru for 64bit environment.

I notice windows server 2008 has a directory  C:\Windows\Microsoft.NET\Framework64 would I be using the browser file in this directory???

Please help!

Under the Table: Programming with FileStreams in SQL Server 2008


There's always been disagreement about whether large blobs, such as document and multimedia items, should be stored in the database or file system. In SQL Server 2008 you don't have to choose; filestream storage provides the best of both approaches.

Bob Beauchemin

MSDN Magazine May 2009

Under The Table: Spatial Data Support In SQL Server 2008


New spatial data support in SQL Server 2008 opens the door to mapping and querying geometric and geographic data, allowing you to build exciting new applications.

Bob Beauchemin

MSDN Magazine February 2009

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