Re: MSSQL Server Compact Edition 3.5. OleError 0x80040E05 - Object was open during Recordset.Open for certain tables



Ender wrote:
Hello, all.

Last four hours I fought with very strange error. When I try to open
a table through simple query (select * from TableName) ADO (OLEDB)
gives to me abovementioned error message. Some tables are opened
without a problem but for some tables there is error. I tried to
determine what is the difference between these tables and was very
surprised. This error happens when table have nvarchar fields with
maximum length more than 127. For example this table will be opened
without problems:
For this table opening works

create table Projects(
ID integer identity (0, 1) constraint PK_Projects primary key,
Name nvarchar (127) not null);

but this table won't open

For this table opening doesn't work

create table Projects(
ID integer identity (0, 1) constraint PK_Projects primary key,
Name nvarchar (255) not null);

Both tables perfectly opened through Visual Studio 2008. I suppose it
uses ADO.NET but I use ADO (OLEDB) from program written on Delphi.
Could someone direct me to the place in the documentation where such
restriction is mentioned? Andy why such non-informative error message?

Are you using a client-side cursor? I just did a google search and found
someone who solved this by switching to a server-side cursor:
http://groups.google.com/group/microsoft.public.sqlserver.ce/msg/93902a9869035f51

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"


.



Relevant Pages