Re: Recovering from an updatebatch error with a clone - Delphi 7.lnk (0/1)




>Well no I don't lose the data... It is there, only that the edits cannot be
>saved.
>I looked at the BetterAdodataset.LoadFromFile and it does:
>
> Close;
> CommandType := cmdFile;
> LockType := ltBatchOptimistic;
> CommandText := FileName;
> Open;
>
>And Open if it's already open won't do anything... Only idea that I have
>left is to create another dataset in memory and copy the data there as
>backup
>but it's really overkill.

Yes if CommandType is cmdFile then yes open uses the file.
You have to set command type back to cmdText and command text back to your
original query as well as set you connection to get back to your original state.
--
Brian Bushay (TeamB)
Bbushay@xxxxxxxxx
.



Relevant Pages

  • Re: Recovering from an updatebatch error with a clone - Thanks Brian!
    ... > You have to set command type back to cmdText and command text back to ... > your original query as well as set you connection to get back to your ... Have you seen Marillion's Marbles? ...
    (borland.public.delphi.database.ado)
  • Re: Preventing users from overwriting existing data
    ... There, you can Lock the control if its value is not NULL, and unlock ... > assume that I would add a command button and enter the code for the On ... >> Simplest would be to set the Allow Updates property of the Form to No; ... >> Edits property to Yes; set it back to No in the form's Current event. ...
    (microsoft.public.access.forms)
  • RE: Forms Add, Edit or View
    ... Eric the Rookie ... I want to use the same form for all Data Entry, Allow Edits, Allow Deletions. ... The command buttons will be Add, ...
    (microsoft.public.access.modulesdaovba)
  • Re: Bookmark bonanza
    ... >even make a couple keystrokes; just open me up to the last sentence I was ... press Shift+F5 (the GoBack command). ... Pressing it twice more will go back to the previous two edits, ...
    (microsoft.public.word.docmanagement)
  • Re: word 2007 and combining edits from different users...
    ... On the Reviewing tab, under Compare, click the Combine command. ... you do is combine the first set of edits, ... Microsoft Office MVP ... seems to be able to combine the edits of 2 persons, ...
    (microsoft.public.word.docmanagement)