SQL Server Compact Edition 3.5 gives “Multiple-step operation generated errors” error for simple query

北战南征 提交于 2019-12-02 12:29:43

问题


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

This query works fine:

SELECT Thing FROM OtherThing WHERE name = 'TextThing'

This query fails:

SELECT Foo FROM Stuff

And this is the error I get:

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

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.

What I've tried:

  • 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?).

回答1:


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.



来源:https://stackoverflow.com/questions/6962306/sql-server-compact-edition-3-5-gives-multiple-step-operation-generated-errors

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!