ExecuteNonQuery - SQL CE error

  • Thread starter Thread starter Alina
  • Start date Start date
A

Alina

Hello

In a C# (.NET CE) program we have a sqlCeCmd.ExecuteNonQuery("DELETE FROM table1 WHERE id1 IN (SELECT id2 FROM table2 WHERE flag2 = 'D')").
This give us the following error: "80040E0E - Invalid bookmark", but we are not using bookmarks..
table2 - is the result of a Pull from the server (which is working fine)
table1 - is the final table on SQL CE (which already has some data inside)

What could be the problem ?

Thank you,
Alina
 
Wow, I haven't come across that exception in the compact framework. Anyway, the scenario you describe has a known problem http://support.microsoft.com/default.aspx?scid=kb;en-us;303004 although I don't think that's the exception message. If you would, post the code block and I'll be glad to take a look at it for you.
--

W.G. Ryan, eMVP

Have an opinion on the effectiveness of Microsoft Embedded newsgroups?
Let Microsoft know!
https://www.windowsembeddedeval.com/community/newsgroups
Hello

In a C# (.NET CE) program we have a sqlCeCmd.ExecuteNonQuery("DELETE FROM table1 WHERE id1 IN (SELECT id2 FROM table2 WHERE flag2 = 'D')").
This give us the following error: "80040E0E - Invalid bookmark", but we are not using bookmarks..
table2 - is the result of a Pull from the server (which is working fine)
table1 - is the final table on SQL CE (which already has some data inside)

What could be the problem ?

Thank you,
Alina
 
Here is the code:

Delete from tb_rem Where tb_rem_id IN
(Select tb_rem_id From tb_rem_temp Where Action_maj = 'R' OR Action_maj =
'M')

And the problem is not a very long time, but a real crush.
And if we do the inner Select directly in SQL CE Query it crush with the
same message.. so it seems to be a problem in SQL CE.
tb_rem is the old table on the WindowsCE device, tb_rem_temp is the result
of a Pull from the server.

Thank you,
Alina


Wow, I haven't come across that exception in the compact framework. Anyway,
the scenario you describe has a known problem
http://support.microsoft.com/default.aspx?scid=kb;en-us;303004 although I
don't think that's the exception message. If you would, post the code block
and I'll be glad to take a look at it for you.
--

W.G. Ryan, eMVP

Have an opinion on the effectiveness of Microsoft Embedded newsgroups?
Let Microsoft know!
https://www.windowsembeddedeval.com/community/newsgroups
Hello

In a C# (.NET CE) program we have a sqlCeCmd.ExecuteNonQuery("DELETE FROM
table1 WHERE id1 IN (SELECT id2 FROM table2 WHERE flag2 = 'D')").
This give us the following error: "80040E0E - Invalid bookmark", but we are
not using bookmarks..
table2 - is the result of a Pull from the server (which is working fine)
table1 - is the final table on SQL CE (which already has some data inside)

What could be the problem ?

Thank you,
Alina
 
Here is the code:

Delete from tb_rem Where tb_rem_id IN
(Select tb_rem_id From tb_rem_temp Where Action_maj = 'R' OR Action_maj =
'M')

How about rewriting it as an 'exists' clause instead? Maybe that would
work. Obviously this is a shot in the dark seeing as what you've got
already looks like it should work too.

delete from tb_rem where exists (select tb_rem_id from tb_rem_temp where
tb_rem.tb_rem_id=tb_rem_temp.tb_rem_id and (tb_rem_temp.Action_maj='R' or
tb_rem_temp.Action_maj='M'))

Or something similar to that. It's like 90 degrees in this room and my
brain is slowly broiling!

Hope it helps,

Richard.
 
Hi Alina:

My apologies but I can't replicate it. I got a pretty large delete/subquery
working earlier today. Did I understand you correctly in that the inner
Select statement will crash if you run it in Query Analyzer?

--
W.G. Ryan MVP Windows - Embedded

Have an opinion on the effectiveness of Microsoft Embedded newsgroups?
Let Microsoft know!
https://www.windowsembeddedeval.com/community/newsgroups
 
Thank you for your answers.
Yes, the select will crush in SQL CE Query. And we succeed to replicate the
error 3 times on the same machine, but only on that machine..
We are working with a very large SDF file (355 MB).
Thank's ,
Alina
 
Back
Top