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



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?

.



Relevant Pages