Re: Again: How to copy a memo



Hi,
I now know,
how it works: I use now tADOTable (instead of tADODataset), and set the
filter to my record. Then I can assign.
It seems, that tAdoDataset don't work the same way.


Willi


"Willi Kühnis" <wkuehnis@xxxxxxxxxx> schrieb im Newsbeitrag
news:42942d9a$1@xxxxxxxxxxxxxxxxxxxxxxxxx
> Hi,
> yesterday, I got some tipps, how to copy a memo (ADO,D7)
> I tried a lot now, but it still don't work.
> When I post, then I get a exception. (when I don't post, then the value is
> not saved)
> Question: with which AdoComponent can I change a field with assign ?
> TADOQuery or TADODataset ?
>
> Thanks
> Willi
>
>
>
> dsShop := tAdoDataSet.create(Application);
> dsShop.Connection := pShopADOConn;
> dsShop.CommandText := 'Select Mess from MessO where Nummer=' +
> inttostr(NummerArr[ii]) ;
> dsShop.Open;
> //
> dsZent := tAdoDataset.create(Application);
> dsZent.Connection := pConnZentRW;
> dsZent.CommandText := 'Select Mess from MessZwisch where
> Nummer=' + inttostr(NewNum) ;
> dsZent.Open;
> //
> dsZent.Edit;
> dsZent.FieldByName('Mess').assign(dsShop.FieldByName('Mess'));
> if dsZent.State in [dsEdit] then begin
> dsZent.Post;
> end;
> //
> dsShop.close;
> dsShop.free;
> dsZent.close;
> dsZent.free;
>
>


.



Relevant Pages

  • Re: How to copy a memo
    ... With tADODataset it's not possible tu use a ... Willi ... >>another table, in another connection. ...
    (borland.public.delphi.database.ado)
  • Re: TADODataset.Filter?
    ... all I have the correct results when I do not use the filter property? ... properties either or both in TADODataset and in TADOQuery. ... are you sure your DBGrid is connected to the correct DataSource / DataSet? ... I tried this tonight and got a most surprising result: ...
    (borland.public.delphi.database.ado)
  • Re: Setting TADODataset.Properties[Update Criteria].value :=
    ... Thanks for staying with me on this.. ... >>I also tried (dataSet as TADODataSet as in your example). ... > Brian Bushay (TeamB) ... Prev by Date: ...
    (borland.public.delphi.database.ado)
  • TCustomADODataSet.SetFiltered failure
    ... I'm trying to apply the fgPredicate filter group to my TADODataSet to know ... which records have been deleted so that I can execute ...
    (borland.public.delphi.database.ado)
  • Verify if field is unique in BatchOptimistic
    ... Is there a way to check if a field is unique in TADODataset ... MyADODataSet.Lookup('MyUniqueField', somevalue, 'MyUniqueField') ... Prev by Date: ...
    (borland.public.delphi.database.ado)