Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 6 of 6 total
Thread Using DataSets "disconnected"
Thu, Jun 27 2019 12:00 PMPermanent Link

Matthew Jones

I want to use a Dataset to control a grid. I can add things fine, but it then errors saying that it was unable to save the data with a bad request. A search showed I can use the
   Database.AutoTransactions := false;
option to stop this. But does that mean that it is building up a long list of things to change that will never be done?

Is there a proper way to do what I want?

--

Matthew Jones
Thu, Jun 27 2019 1:13 PMPermanent Link

Raul

Team Elevate Team Elevate

On 6/27/2019 12:00 PM, Matthew Jones wrote:
> I want to use a Dataset to control a grid. I can add things fine, but it then errors saying that it was unable to save the data with a bad request. A search showed I can use the
>      Database.AutoTransactions := false;
> option to stop this. But does that mean that it is building up a long list of things to change that will never be done?
>
> Is there a proper way to do what I want?

I believe this is the current built-in behaviour.

You can check for Database.NumPendingRequests and if > 0 then call
Database.CancelPendingRequests to clear them


See :

https://www.elevatesoft.com/manual?action=viewtopic&id=ewb2&topic=Transactions

and

https://www.elevatesoft.com/manual?action=viewtopic&id=ewb2&topic=Database_Architcture

Raul
Fri, Jun 28 2019 3:51 AMPermanent Link

Matthew Jones

Raul wrote:

> You can check for Database.NumPendingRequests and if > 0 then call Database.CancelPendingRequests to clear them

Thanks - that makes me happy.

--

Matthew Jones
Fri, Jun 28 2019 8:06 PMPermanent Link

Steve Gill

Avatar

Hi Matthew,

<< I want to use a Dataset to control a grid. I can add things fine, but it then errors saying that it was unable to save the data with a bad request. A search showed I can use the
   Database.AutoTransactions := false;
option to stop this. But does that mean that it is building up a long list of things to change that will never be done?

Is there a proper way to do what I want? >>

Not sure if this is applicable to your situation but I hardly ever use data-aware grids, or any data aware controls for that matter (mainly for flexibility).  For one of my applications I needed users to be able to select multiple rows in a grid and perform actions on them.  To do all this I wrote a class to manage the grid.  It is the "interface" between the grid and the database.  Could be worth considering.

= Steve
Fri, Jun 28 2019 8:07 PMPermanent Link

Steve Gill

Avatar

<< Not sure if this is applicable to your situation but I hardly ever use data-aware grids, or any data aware controls for that matter (mainly for flexibility).  For one of my applications I needed users to be able to select multiple rows in a grid and perform actions on them.  To do all this I wrote a class to manage the grid.  It is the "interface" between the grid and the database.  Could be worth considering. >>

Oops, sorry.  I was thinking I was in the EDB forums.  Just ignore me.  I'll go back into my corner now.

= Steve
Mon, Jul 1 2019 5:15 AMPermanent Link

Matthew Jones

Steve Gill wrote:

> Oops, sorry.  I was thinking I was in the EDB forums.  Just ignore me.  I'll go back into my corner now.

8-) FWIW, I have in the past filled grids in EWB manually, but the dataset gives things like sorting for free. I've done a few simple apps now and it is lovely to be able to run it in the IDE and access a server. Not been able to do that on my more complex apps!

--

Matthew Jones
Image