The Design of Software (CLOSED)

A public forum for discussing the design of software, from the user interface to the code architecture. Now closed.

The "Design of Software" discussion group has been merged with the main Joel on Software discussion group.

The archives will remain online indefinitely.

Post when user click save menu item on ADO.

Hi guys.

You know, default ADO DataSet example in Delphi (or VB/VC++) post update to jet file on every CRUD event.
But most application save data to database file when only user do save action.

How can I design this?

I suppose 'Cached Updates' and 'Apply Updates' are solutions.
Is that right?

Thanks for any advance and sorry poor english.
Saturday, June 10, 2006
I don't know about that example, but sounds like it has only two layers (GUI and DB), is that right? You need to have another layer in the middle: GUI->BusinessObject->DB... So that not all GUI actions go directly to DB... Then you can decide to do caching or whatever...

Hope this helps.
hobit Send private email
Saturday, June 10, 2006
To Hobit

Ya, most delphi/VB's DataSet examples are 2 layers.

But I suppose there is easy way to implement my purpose in 2 layers desktop applications.
Just change DataSet setting or somthing.

I can't believe most Quick and Dirty VB/Delphi's GUI applications are 3 layers.

Thanks : )
Saturday, June 10, 2006
You can do the posting of the data only when the user clicks on a Save button by making use of non-data aware controls. If you approach it this way then you can very much control when you post to the database.

For example you can have an click event attached to a Save button control e.g.

procedure MyEditForm.Click;

procdure MyEditForm.SaveRecord;
  // this is where you posting code will be
  // you setup the appropriate sql statements

Hope this helps.
Phillip Flores Send private email
Sunday, June 11, 2006

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics
Powered by FogBugz