SqlCeCommand.ExecuteNonquery() for update hangs application

  • Thread starter Thread starter Lonifasiko
  • Start date Start date
L

Lonifasiko

I must update my SQL Mobile 2005 database from my Smart Device CF 2.0
application. Coded with C# and VS.NET 2005 Beta2. It's a very simple
update statement:

UPDATE APPOINTMENT SET appointmentReason = '1' WHERE appointmentId =
'bf8c3c39-a34f-da11-8e73-0004e2b45615'
Note that appointmnetId is a rowguid column.

I create a SqlCeConnection, then a SqlCeCommand with the previous
connection and the update statement and just call
command.ExecuteNonQuery(). No exceptions, no errors and of course,
update is not made to dabase! Is is like an infinite bucle and
application hangs. Debugger also hangs when just executing the
statement.

The worst is that if I open the database in the device and execute the
update statement, works!!!

What could be the problem? Select statements seem to work perfectly!
Haven't tried yet insert statements but I suppose there will be
problems here too.

Thanks in advance.
 
if that table is an article in a merge publication, you cannot
change the rowguid. are you using merge replication?

--
Darren Shaffer
..NET Compact Framework MVP
Principal Architect
Connected Innovation
www.connectedinnovation.com
 
Back
Top