How to use AppModeler to generate Delphi forms using Cached Updates

<HTML>
<TT>A beginner's question regarding AppModeler 6.1, Delphi 3, and Interbase
5.x...</TT>

<P><TT>While I am impressed with the amount of thought and work that has
gone into AppModeler, I have nonetheless been surprised to discover that
the Delphi application generated by AppModeler is not suitable for real-world
situations because of the "fly-away" problem afflicting newly-entered records.</TT>

<P><TT>When I enter a record on an AppModeler-generated Delphi form, the
record disappears ("flies away") immediately after it is posted. So, if
I enter ten records on a Delphi form and post each one, only the last record
is visible. In this situation, the only way to see all the newly-entered
records is to close the form and reopen it again.</TT>

<P><TT>I have been informed by Reid Roman on the newsgroup borland.public.delphi.database.sqlservers
that I should use "cached updates" to handle the data providing and resolving
process. Delphi Help says to do the following for a form based on a TQuery
dataset:</TT>

<P><TT>- Set the CachedUpdates property of the form's TQuery object to
TRUE.</TT>

<P><TT>- Create a TUpdateSQL object and point the TQuery's UpdateObject
property at it.</TT>

<P><TT>- Write event-handling code to apply the TUpdateSQL object at the
appropriate time (eg, when the form has been closed).</TT>

<P><TT>So now I've got to do two things:</TT>

<P><TT>- Create the Delphi objects and event-handling code to deal with
cached updates.</TT>

<P><TT>- Customize AppModeler's Delphi 3 templates so that these objects
and event-handling code are generated for all the tables in my database.
(This one has around 80 tables.)</TT>

<P><TT>As a beginner, I feel hesitant about modifying the Delphi 3 templates
that ship with AppModeler, especially when it would mean I'd have to worry
about all the subtleties of record-contention issues. I really find it
hard to believe that this level of customization is needed in order to
get AppModeler to create a usable Delphi front-end for an SQL database.</TT>

<P><TT>Since this kind of problem will eventually confront everyone who
tries to use AppModeler with Delphi for an SQL database, I hope there are
some standard solutions for this problem. Has anyone modified AppModeler's
Delphi 3 templates to deal with cached updates?</TT>

<P><TT>Any help would be greatly appreciated.</TT>

<P><TT>---------------------</TT>
<BR><TT>Scott Alexander</TT>
<BR><TT>scottx@bellsouth.net</TT>
<BR><TT>Jacksonville, Florida</TT></HTML>

0
Scott
10/15/1998 7:14:29 PM
sybase.powerdesigner.general 9408 articles. 1 followers. Follow

1 Replies
751 Views

Similar Articles

[PageSpeed] 52

This sounds like a job for the guys in Tech Support.  Submit this issue as a
bug to them and they will get the big guns aimed at it.  I agree that this
is a problem with AppModeler for anyone using Delphi.

Good luck!

--
Michael F. Nicewarner [TeamPS]
mailto:mike.nicewarner@ibpinc.com
http://www.datamodel.org

    Scott Alexander wrote in message <36264995.A82826A@bellsouth.net>...
    A beginner's question regarding AppModeler 6.1, Delphi 3, and Interbase
5.x...
    While I am impressed with the amount of thought and work that has gone
into AppModeler, I have nonetheless been surprised to discover that the
Delphi application generated by AppModeler is not suitable for real-world
situations because of the "fly-away" problem afflicting newly-entered
records.

    When I enter a record on an AppModeler-generated Delphi form, the record
disappears ("flies away") immediately after it is posted. So, if I enter ten
records on a Delphi form and post each one, only the last record is visible.
In this situation, the only way to see all the newly-entered records is to
close the form and reopen it again.

    I have been informed by Reid Roman on the newsgroup
borland.public.delphi.database.sqlservers that I should use "cached updates"
to handle the data providing and resolving process. Delphi Help says to do
the following for a form based on a TQuery dataset:

    - Set the CachedUpdates property of the form's TQuery object to TRUE.

    - Create a TUpdateSQL object and point the TQuery's UpdateObject
property at it.

    - Write event-handling code to apply the TUpdateSQL object at the
appropriate time (eg, when the form has been closed).

    So now I've got to do two things:

    - Create the Delphi objects and event-handling code to deal with cached
updates.

    - Customize AppModeler's Delphi 3 templates so that these objects and
event-handling code are generated for all the tables in my database. (This
one has around 80 tables.)

    As a beginner, I feel hesitant about modifying the Delphi 3 templates
that ship with AppModeler, especially when it would mean I'd have to worry
about all the subtleties of record-contention issues. I really find it hard
to believe that this level of customization is needed in order to get
AppModeler to create a usable Delphi front-end for an SQL database.

    Since this kind of problem will eventually confront everyone who tries
to use AppModeler with Delphi for an SQL database, I hope there are some
standard solutions for this problem. Has anyone modified AppModeler's Delphi
3 templates to deal with cached updates?

    Any help would be greatly appreciated.

    ---------------------
    Scott Alexander
    scottx@bellsouth.net
    Jacksonville, Florida



0
Michael
10/27/1998 9:44:42 PM
Reply:

Similar Artilces:

Need AppModeler templates to generate Delphi 3 master/detail forms using Cached Updates
Summary ======= Following are additional questions regarding the issue of cached updates. I don't have any answers - what I'm trying to say is that concurrent multi-user database access is an incredibly complicated and important issue, and I think the Delphi client/server developer community is in dire need of more formal guidance in this area. Frankly I'm amazed that between Borland, Interbase and the Sybase/Powerdesigner people (not to mention third-party authors), there does not seem to be a single worked-through example of this basic, vital topic: How t...

To use or not to use Delphi
Sadly, it seems to me that there is a sort of race between the two threads, for and against using Delphi in new projects, with more or less the same users posting in both threads. Arguments are fiercely debated in both camps. Borland had their own vision. As a community, now that Delphi has changed ownership I believe we should try to be more consistent, more clear, and more articulate in what we expect from Embercadero in terms of Delphi. We can contribute to keeping Delphi alive and moving in the right direction. "Laurent Cocea" schrieb: > Sadly, it seems to me that there ...

Using Using
I have just completed reading a chapter in my book on performance. The books says to speed up performance on your web site you should use the using statement when opening connections. My question is how do you catch errors if you are using this as apposed to a try catch block.thanksBryan  Why would you use it as an alternative to a try/catch statement. Couldn't you just do something like  public void UsingSomeMethod() { try { SomeMethod(); } catch(SomeException e) { /// do something useful }}public void SomeMethod() { using (Something) { ...

When to use ( and when to use ((?
I'm just not getting it. When do you use ( in a statement, when do you need to use ((, and is the space after either or both mandatory? For example, I coded this statement: if (( $_ eq $bad_guys_ip )) { more_stuff_here }; Why the two (( in an if? And why does it seem to not work when I miss the space after the ((? Thanx! Mark me as... /Corn-fused|Dense/ > I'm just not getting it. >=20 > When do you use ( in a statement, when do you need to use ((, and is > the space after either or both mandatory? >=20 > For example, I coded this sta...

cache partitions for dbcc "Do not use cache partitions in a cache being used for dbcc checkstorage"
The System Adminstration manual says: Warning! Do not use cache partitions in a cache being used for dbcc checkstorage. However, I do not understand what the problem will be. If I dont bind it to a cache, it will default to the 'default data cache', which has 2 partitions. All of my named caches have 2 partitions. Can anyone explain why ? ...

can i use use mozilla updater application for updating my app?
Hello, Can i use use mozilla updater application for updating my app? Will i break some licence? Thank you! The updater code is tri-licensed MPL/GPL/LGPL. You will need to choose one of the three licenses that the updater code is covered by and obey its rules. For example if you choose the MPL. Section 3 is the really important section as a person interested in using the code. Read it closely and it will explain the rules you need to follow. http://www.mozilla.org/MPL/MPL-1.1-annotated.html http://www.mozilla.org/MPL/mpl-faq.html http://www.gnu.org/licenses/gpl-2.0....

How to use the arguments to use() in the package being used
Howdy,=20 The subject says it all believe it or not :) What I'm trying to figure out is how to pass an argument=20 (pragma I believe is the proper term) to use() and do=20 sonethign in the package based on it. I've looked at CGI.pm source but can't seem to track it down.=20 (Similar idea as to CGIs -oldstyle_urls -newstyel_urls) http://search.cpan.org/~lds/CGI.pm-3.04/CGI.pm#PRAGMAS What I'd like to do is something like this: # for old time's sake we'll just use our favorite module use Foo::Monkey qw(:Foo :Bar -doamazingthings); #then in Foo::Monkey...

HEEELLLLPPP!! Using VB on a form; is there a way to insert a record/update a DB WITHOUT using datagridview/detailview etc.?
FIRST...I am willing to research/teach myself, but I am having no luck in even getting started on this one. I taught myself LotusScript and am starting in on VB for web development. Just need someone to get me going, thanks in advance. Just trying to develop a form where I can specify which fields to update/add or insert a row in a table, but I DO NOT want to do so with the provided datagridview/detailview etc. controls. I would like to do so using VB instead.For example I have a table called contacts, I have no need to even present any existing data, I just want the user to be able...

Delphi 2010 Uses Clause Does Not Auto Update When Adding Components to Form
For no reason my Delphi 2010 IDE has developed a bug. When I drop a button or label onto the form the uses clause does not automatically get updated with StdCtrls. This happens with all components. Anytime I drop a component on a form the uses clause doesn't updated with the new units. I have rebooted my machine, didn't work. I have gone into Add Remove Programs and did a repair, didn't work. How do I get the IDE to work properly when I drop components onto forms? Michael Riley wrote: > For no reason my Delphi 2010 IDE has developed a bug. When I drop a > button or...

Could not use ''; file already in use. or Operation must use an updateable query.
 i developed a web application using ms-access and locally it works all fine i able to insert/update and delete but when i publish the web site to shared hosting company, i started having problemssome times i get error like: Operation must use an updateable query.   System.Data.OleDb.OleDbException: Operation must use an updateable query   OR the below error   do you know how do i fix this? i'm really concern will i be able to use ms-access mdb in web ?, i will be hitting around 20 to 50 users, i do not have any other choice but to use MDB. Server Error in '...

How to use C++ Builder form in Delphi form ?
Dear all, I can call a Delphi form in C++ Builder project, but I can not call a C++ Builder form in a Delphi form? Help me please! Thank you very much! Nguyen Duy Tuan Hi Tuan, > I can call a Delphi form in C++ Builder project, but I can not call a C++ Builder form in a Delphi form? That's correct... > Nguyen Duy Tuan Groetjes, Bob Swart -- Bob Swart Training & Consultancy (eBob42.com) Forever Loyal to Delphi CodeGear Technology Partner -- CodeGear RAD Studio Reseller (BeNeLux) Delphi Win32 & .NET books on Lulu.com: http://stores....

To use caching or to use ViewState object
I have some data in the database that I dont want to load on every page load event. So I am using Caching for this purpose my code looks something like this: private void Page_Load(object sender, System.EventArgs e)         {             // Cache the data so that we dont have to access the database on each page load.                         if(Cache["Events"] == null)          &nb...

how to use form tag in the content page while master page form tag is in use?
Hi there, i have created a bug report form in the content page which uses the master page template. In the master page i am using the menu which should be in the form tag. when i use the form tag in the content it gives me the error as cant use more than one form tag. how can i resolve it. i hav searched in this forum for tht.. i got links which says to disable the content page form tag as form.visible= false. In my situation i cant disable any of the form tag either inthe master page( menu with in the form tag) or content page ( bug report form with server controls with...

facing problem in programming (update but not using update query) using get, set property
 hi all,I am facing problem in programming.Can anybody please let me know how to solve the problem.I have a link, clicking the link opens a page in which there are some data which is coming from different tables(join realtionship). And some data has to be inserted in that page(textbox)In this page i have 2 buttons send and save. On clicking send button the page content will be sent to the particular email-id. And on clicking save button the page content has to go to different tables and columns( i.e; the data will be saved into tables). And some data has to be updated also. I don't ...

Web resources about - How to use AppModeler to generate Delphi forms using Cached Updates - sybase.powerdesigner.general

Resources last updated: 12/5/2015 6:30:43 PM