Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 5 of 5 total
Thread Memory (runtime) dataset update from another form
Sat, May 27 2017 9:35 PMPermanent Link

Huseyin Aliz

myBiss ApS

Avatar

Hi All,

I have a running memory (runtime) dataset on form1 attached to a grid,
working fine on form1. I now need to update some values for dataset from
form2.

When i try this, something like "dataset needs to be in editable mode"
shows up.

Sample code i use (on form2):

form1.dataset.update;
form1.dataset.columns['field'].asFloat:= 1;
form1.dataset.save;

I've tried several things - cannot get it working. I have only 1 event
defined for the runtime dataset (onrowchanged). Maybe other events are
needed?

Thanks in advance,

Hüseyin
Mon, May 29 2017 8:27 PMPermanent Link

erickengelke

Avatar

=?UTF-8?Q?H=c3=bcseyin_Aliz?= wrote:
>When i try this, something like "dataset needs to be in editable mode"
>shows up.

1. I'd recommend creating a member function on Form1 to update things within the form unit rather than manipulating data willy-nilly from other forms/units.

2. Have you accidentally named both forms Form1, that's a common mistake, at least one i've made before.

E
http://www.erickengelke.com
Wed, May 31 2017 6:32 AMPermanent Link

Huseyin Aliz

myBiss ApS

Avatar

Hi Eric,

Thanks for the input. I've fixed the error.

Regards,

Hüseyin


Den 30/05/2017 kl. 02.27 skrev erickengelke:
> =?UTF-8?Q?H=c3=bcseyin_Aliz?= wrote:
>> When i try this, something like "dataset needs to be in editable mode"
>> shows up.
> 1. I'd recommend creating a member function on Form1 to update things within the form unit rather than manipulating data willy-nilly from other forms/units.
>
> 2. Have you accidentally named both forms Form1, that's a common mistake, at least one i've made before.
>
> E
> http://www.erickengelke.com
>
Wed, May 31 2017 7:26 AMPermanent Link

Uli Becker

> Thanks for the input. I've fixed the error.

It's always helpful for other users having the same problem to post what
the error was und how you fixed it.

Uli
Wed, May 31 2017 8:43 AMPermanent Link

Huseyin Aliz

myBiss ApS

Avatar

Uli,

The fix was that it worked next day i tried.. it was a very long day and
i was very tired.. so dont know what happened Smile

Otherwise i agree with you..

Regards,

Hüseyin


Den 31/05/2017 kl. 13.26 skrev Uli Becker:
>> Thanks for the input. I've fixed the error.
>
> It's always helpful for other users having the same problem to post
> what the error was und how you fixed it.
>
> Uli
>
Image