开发者

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

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 thi开发者_如何学JAVAs one (thoughts?).


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜