Re: Stupid Question - I think!



Earl,
I know that the table was not updated because I go to the Query Analyzer on
the PDA and examine the contents of the table after running my app. Also the
update statement shown below does run in the Query Analyzer on the PDA
(against the CE database) and does produce the desired result.

As for back end issues, this table does have a trigger, but the trigger does
not restrict the column I'm updateing in any way. I assume (perhaps
erroneously) that the trigger doesn't replicate anyway.

Bill


"Earl" wrote:

> A preliminary question: how do you know the CE database is not executing an
> update? Are you checking this in the Query Analyzer after you run the code?
> You could also try to execute an update using the Query Analyzer to confirm
> your Update statement executes properly.
>
> There are many potential pitfalls with replication. I too had some SQLCE
> update problems that were not code related at all, rather the issue was with
> the backend database structure.
>
> "Bill" <Bill@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
> news:E7F721DB-DD6C-466C-84D5-4858B26248B3@xxxxxxxxxxxxxxxx
> > Ok, so I managed to get merge replication working and I have a single
> > table
> > in a database out on my PDA. I now want to change a row in the table and
> > synch back to the main database. I'm trying to the easy part - use
> > System.Data.SqlServerCe to update the table but I can't get the blasted
> > table
> > to update! Here is my code, the update statement works and produces the
> > correct results if I run it in Query Analyzer against the main database.
> > If
> > the code below is run on the PDA against the CE database no exceptions are
> > thrown, and no rows are updated. Have I goofed up this code?
> >
> > Bill
> >
> >
> > try
> > {
> > SqlCeConnection cn = new SqlCeConnection( @"Data Source=\My
> > Documents\oxsite.sdf" );
> >
> > string str = "UPDATE cioxsitelist SET oxsitelabel = 'Kilroy was here'
> > WHERE oxsitecode = 66";
> > SqlCeCommand cmd = new SqlCeCommand( str, cn );
> > cmd.CommandType = CommandType.Text;
> > cn.Open();
> > cmd.ExecuteNonQuery();
> > cmd.Connection.Close();
> > }
> > catch( SqlCeException sex )
> > {
> > foreach( SqlCeError err in sex.Errors )
> > {
> > MessageBox.Show( err.Message, "SQL CE Error" );
> > }
> > }
> > catch( Exception ex )
> > {
> > MessageBox.Show( ex.Message, "Error" );
> > }
> >
>
>
>
.



Relevant Pages

  • Re: Delphis for CE?
    ... One choice is going to be language to program in, and the other will be database to store data with. ... We're also considering having either a PDA add-on that synchs with the desktop version, or a PDA stand-alone without desktop version. ... I am used to regular databases like Firebird, MSSQL etc so the easiest way to get used to it for me was to treat it like a searchable object stack. ... My latest experiment was creating a mongrel database class of my own using XML to load/save to file, and loading search criterion into datatableat run time. ...
    (borland.public.delphi.non-technical)
  • RE: Linked table sync problem
    ... The pda just inserts data ... with database 2. ... The overall process is the PDA contacts a web service that enters data into ... The PDA using a web service enters data into the data mdb and I can open the ...
    (microsoft.public.access.externaldata)
  • Re: MS ActiveSync and Delphi
    ... I don't think you'll find RAPI will be useful for database synchronisation ... as such, it will enable you to run PDA applications, test whether PDA apps ... Delphi app to synchronise changes between My desktop database application ...
    (borland.public.delphi.non-technical)
  • Re: MS ActiveSync and Delphi
    ... What I would like to do is use a Delphi app to read the records of the SQL ... CE database and look for changed records and new ones. ... > I don't think you'll find RAPI will be useful for database synchronisation ... > as such, it will enable you to run PDA applications, test whether PDA apps ...
    (borland.public.delphi.non-technical)
  • Re: Local datastore for visual basic .net aplication on a pda
    ... >I have this project for developing an drug interaction aplication for a pda ... >most of the database access controls and etc available on the full .net ... >database file as an local datastore without the SQL server running? ... We support Win32 for the development tool and all Windows CE, Pocket PC, ...
    (microsoft.public.vsnet.general)