Board index » delphi » DataModules & Multiple row views

DataModules & Multiple row views

I have written an app (which in now in distribution) that is a c/s app, with
lots of forms, and lots of data access.  Now, I am getting ready to begin a
new project and I am thinking that I need to look at have one or more
TDataModule(s) in my new project.  I understand the basic idea of the DM,
however some issues are raised in my mind.  For example:

A DbGrid is displayed that lists a customer file.  The user can, at any time
double click to 'zoom' to a full view of the customer.  The customer view
form is NOT a MODAL form.  Therefore, the user can return to the grid and
select yet another customer from the list for viewing/editing.  In other
words, the user can many customer view/edit forms up at the same time, and
simply switch between them.

Now, I am trying to figure out if the TDataModule keeps all that activity
under control, or do I have to mess around with 'bookmarking' all the time?
Obviously, if the DM allows me to do adds/changes/deletes to different rows
in the same table, at the same time, we're in business.  Somehow, I don't
think it will.  Anyway, and input would be appreciated, thanks..

 

Re:DataModules & Multiple row views


I think you don't.
TDataModule don't keeps all that activity under control
do you use tquery ?
You need create a new form dinamically with a memory tquery inside, not in
datamodule. I suggest you to use the freeware RX-Lib TMemoryTable object.
After create you "post" the selected record from original query (grid) in to
TMemoryTable.
After that the form work with this query, then when the user accept changes for
close the edit form, you check if data are changed and proceed with changes.

Charlie

Andy Faust escribi:

Quote
> I have written an app (which in now in distribution) that is a c/s app, with
> lots of forms, and lots of data access.  Now, I am getting ready to begin a
> new project and I am thinking that I need to look at have one or more
> TDataModule(s) in my new project.  I understand the basic idea of the DM,
> however some issues are raised in my mind.  For example:

> A DbGrid is displayed that lists a customer file.  The user can, at any time
> double click to 'zoom' to a full view of the customer.  The customer view
> form is NOT a MODAL form.  Therefore, the user can return to the grid and
> select yet another customer from the list for viewing/editing.  In other
> words, the user can many customer view/edit forms up at the same time, and
> simply switch between them.

> Now, I am trying to figure out if the TDataModule keeps all that activity
> under control, or do I have to mess around with 'bookmarking' all the time?
> Obviously, if the DM allows me to do adds/changes/deletes to different rows
> in the same table, at the same time, we're in business.  Somehow, I don't
> think it will.  Anyway, and input would be appreciated, thanks..

Other Threads