表存储(仿真器)插入失败,"其中一个请求输入无效&QUOT。 [英] Table storage (emulator) insert fails with "One of the request inputs is not valid."

查看:303
本文介绍了表存储(仿真器)插入失败,"其中一个请求输入无效&QUOT。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个导入的过程,从旧的源获取数据,并把它变成表存储,让我重新初始化表存储,并根据需要重新开始。据之前更新到十月份的Azure SDK用于.NET(VS2012)工作。现在,它插入一些实体失败后(这似乎有所不同,导入的数据是不是在本质上是静态)。第一实体,同一类型的,总是成功地插入。分区键是独一无二的,每个RowKey是一个空字符串(的的空)。它是在 SaveChangesWithRetries特别是失败的()。是否有新的SDK,这将是不符合我在做什么之前,任何改变?

I have an import process that takes data from an old source and puts it into table storage, which allows me to re-init table storage and start over as needed. It was working prior to updating to the October Azure SDK for .NET (VS2012). Now, it fails after inserting a few entities (it seems to vary, the imported data is not static in nature). The first entity, of the same type, always inserts successfully. The partition keys are unique, and the RowKey for each is an empty string (not null). It is failing specifically on SaveChangesWithRetries(). Are there any changes in the new SDK that would be incompatible with what I was doing before?

更新

我已经通过查询表存储数据库检查成功插入的行实际的XML。有一件事我注意到的是,在实体可空INT列SQLTYPE 为nvarchar(最大)时,它的零和 INT 时,它不是空。这是打算?

I've been inspecting the actual XML of successfully inserted rows by querying the table storage database. One thing I noticed is that a nullable int column on the entity has SqlType nvarchar(max) when it's null, and int when it's not null. Is this intended?

推荐答案

所以,我已经能够成功地再现一致的基础上的错误,并且事实证明,它在推出了pretty讨厌的错误2012年10月SDK。

So, I've been able to successfully reproduce the error on a consistent basis, and it turns out that it's a pretty nasty bug introduced in the October 2012 SDK.

任何以空格结束将导致异常字符串抛出。在所有的字符串输入呼叫修剪()解决了这个问题。

Any string ending with a space will cause the exception to be thrown. Calling Trim() on all string inputs has solved this issue.

这篇关于表存储(仿真器)插入失败,"其中一个请求输入无效&QUOT。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆