Re: SqlCeCommand.ExecuteNonquery() for update hangs application

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Lonifasiko,

If appointmentReason is a bit field, remove the '' from
around the number 1 on your SQL string.

Yes, SQL CE/SQL Mobile is definitely related to the
Compact Framework, but we need to keep a consistent
archive of discussions around SQL CE in one place.
Most people use Google Advanced Groups search
before posting to determine if their question has already
been asked.

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


"Lonifasiko" <mloichate@xxxxxxxxx> wrote in message
news:1131604633.575439.243400@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> Sorry for posting in compactframework group, but I think it's quite
> related. Here I go:
>
> 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.
>


.



Relevant Pages

  • Re: Text replacing from another table
    ... your new solution doesn't seem to work when I run it in SQL 2005 SP3 ... I think it's because no update statement can update the ... From ReplacementCriteria ... want to consider just doing this with a cursor. ...
    (microsoft.public.sqlserver.programming)
  • Re: New concurrency error
    ... exception in the condition you specify. ... Person A reads record 1 with timestamp 333 ... Person B issues the update statement. ... when I used to use timestamp for concurrency (SQL 6.5), ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Weird problem: Update statement updating records it should not
    ... from table2, table3 ... Field3 won't accept nulls and from the above SQL should never be set ... But the error is that field3 can't be set to null. ... Post the EXACT error the ACTUAL update statement is producing, ...
    (comp.databases.oracle.misc)
  • Re: Sending null values in SQL statements
    ... Thanks Bob. ... asp page and it works well: ... SQL is the UPDATE statement. ...
    (microsoft.public.inetserver.asp.db)