SIGN UP MEMBER LOGIN:    
ARTICLE

Special characters not allowed as a value of Partition Key and Row Key

Posted by Dhananjay Kumar Articles | C# Language November 10, 2011
Learn why you cannot have special characters as a value of Partition Key and Row Key.
Reader Level:

What is wrong with the Partition Key value?

If you are trying to insert a Partition Key and Row Key value like in the below image then very likely you will encounter a DataServiceRequestException.

PartitionKey = "A/1"
PartitionKey = "A#1"
PartitionKey = "A?1"

You cannot have the below special characters as a value of Partition Key and Row Key.

special characters

Let us say you have a table called School and you are trying to insert an entity in that table using the below code.

partition key

You are adding an entity as below,

row key

When you run to add an entity you will get an exception like below,

partition key and row key

In above code if you notice Partition Key Value is

PartitionKey = "A?1"

So while adding an entity makes sure you are not using the four special characters in the value of Row Key and Partition Key. I hope this post is useful. Thanks for reading
  

Login to add your contents and source code to this article
share this article :
post comment
 
6 Months Free & No Setup Fees ASP.NET Hosting!
Become a Sponsor
PREMIUM SPONSORS
  • Finally – a virtual platform that delivers next-generation Windows Server 2008 Hyper-V virtualization technology from a managed hosting partner you can truly depend on. Visit www.maximumasp.com/max for a FREE 30 day trial. Hurry offer ends soon. Climb aboard the MaxV platform and take advantage of High Availability, Intelligent Monitoring, Recurrent Backups, and Scalability – with no hassle or hidden fees. As a managed hosting partner focused solely on Microsoft technologies since 2000, MaximumASP is uniquely qualified to provide the superior support that our business is built on. Unparalleled expertise with Microsoft technologies lead to working directly with Microsoft as first to offer IIS 7 and SQL 2008 betas in a hosted environment; partnering in the Go Live Program for Hyper-V; and product co-launches built on WS 2008 with Hyper-V technology.
    Get 2 Months Free of ASP.NET Hosting for Only $4.95/month! Receive FREE MS SQL and MySQL Databases Including ASP.NET 4/3.5, MVC 3.0, Silverlight 4, Windows 2008/IIS 7.0 Plus FREE IIS 7 Modules. Host UNLIMITED ASP.NET Web Sites - Click Here!
6 Months Free & No Setup Fees ASP.NET Hosting!
Become a Sponsor