Re: renaming a table



Thanks Darren & Joao for your responses.

I ended up doing what Darren had suggested. I create a temp table, check
for data and then replace the main table if it succeeded.

regards,

-Rob


"Darren Shaffer" wrote:

> or, rather than renaming tables, create an inbox table each time, RDA pull
> to that,
> if it succeeds, truncate all rows in your target rable, copy the inbox rows
> to the target, and drop the inbox. if RDA pull fails, drop the inbox and
> try again.
> --
> Darren Shaffer
> ..NET Compact Framework MVP
> Principal Architect
> Connected Innovation
> www.connectedinnovation.com
>
> "Rob C" <RobC@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
> news:4FCF93DD-C131-4DB1-AE10-5D11EB199584@xxxxxxxxxxxxxxxx
> >I am using RDA to download a table of staff records from a SQL Server Db to
> > my SQL CE database. My problem is that you have to drop the existing
> > table
> > first. If I do that and the download fails for some reason, i have lost
> > the
> > table that was there. i could first check for a valid connection before
> > dropping the CE table but there is still a chance it could fail for other
> > reasons.
> >
> > i was thinking that i would rename the local CE table and then drop it if
> > the download succeeded or name it back to its original name if the
> > download
> > fails.
> >
> > I wasn't sure of the best way to do this (couldn't find anything in ALTER
> > TABLE).
> >
> > Also, I was curious how other people might have solved this problem.
> >
> > Thanks,
> >
> > -Rob
> >
>
>
>
.



Relevant Pages

  • Re: renaming a table
    ... or, rather than renaming tables, create an inbox table each time, RDA pull ... if it succeeds, truncate all rows in your target rable, copy the inbox rows ... If I do that and the download fails for some reason, ...
    (microsoft.public.sqlserver.ce)
  • Re: GRACE WAS A REALITY ONCE..DONT MISS THIS ONE..!
    ... 400 words on your hope for the Obama presidency, ... aisle who have caved and who say, "Well, I hope he succeeds. ... what is unfair about my saying I hope liberalism fails? ... Liberalism is our problem. ...
    (alt.vacation.las-vegas)
  • Re: Strange fopen error
    ... First time I open the file with fopen, it succeeds. ... file, it fails. ...   if{ ... I guess it's the glfw lib that changes the working directory. ...
    (comp.sys.mac.programmer.help)
  • Re: .Net (C#) Service Fails To Start
    ... Interesting technique - but when my code fails, it does not seem to even get that far, and when it succeeds, I have no need to debug it, and I cannot predict when it will fail. ... I checked and there are no dependencies marked for the service. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: [PATCH 05/11] sysfs: sysfs_chmod_file handle multiple superblocks
    ... instead of failing half way through but given the interface of ... The latter never fails and the former should always ... succeed if inode_change_oksucceeds never fails ... struct iattr * sd_iattr; ...
    (Linux-Kernel)