SQL Server Compact Edition 3.5给出了“多步操作生成的错误".简单查询错误 [英] SQL Server Compact Edition 3.5 gives "Multiple-step operation generated errors" error for simple query

查看:134
本文介绍了SQL Server Compact Edition 3.5给出了“多步操作生成的错误".简单查询错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在通过Microsoft的OLEDB 3.5 SQL CE驱动程序使用SQL Server CE数据库.这是我的连接字符串:

I'm using a SQL Server CE database via Microsoft's OLEDB 3.5 SQL CE Driver. Here's my connection string:

Provider=Microsoft.SQLSERVER.CE.OLEDB.3.5;Data Source=C:\Users\me\Desktop\test1.sdf

此查询工作正常:

SELECT Thing FROM OtherThing WHERE name = 'TextThing'

此查询失败:

SELECT Foo FROM Stuff

这是我得到的错误:

Multiple-step operation generated errors. Check each status value.

表本身的唯一结构差异是,一个具有文本主键,而另一个具有bigint身份字段作为主键.

The only structural difference in the table themselves is that one has a text primary key and the other has a bigint identity field as a primary key.

我尝试过的事情:

  • http://support.microsoft.com/kb/269495 (均未解决条件对我来说是真实的)
  • 将cursorLocation属性从adUseClient切换到adUseServer(这导致我的所有查询均无法工作-相同的错误).就是说,我想也许我不应该放弃这一点(想法?).
  • http://support.microsoft.com/kb/269495 (neither of the resolution conditions are true for me)
  • Switched the cursorLocation property from adUseClient to adUseServer (this caused none of my queries to work - same error). That said, I think maybe I shouldn't give up on this one (thoughts?).

推荐答案

问题与导致引发该异常的表是具有nvarchar类型且大小为255的字段的表有关.到ntext或将大小减小到100,并且没有引发异常.

The problem has to do with the fact that the tables that caused that exception to be thrown were ones with fields of type nvarchar and sizes of 255. I changed those to ntext or reduced the size to 100 and no exception was thrown.

这篇关于SQL Server Compact Edition 3.5给出了“多步操作生成的错误".简单查询错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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