Jump to content

Creating a Delphi Class as TDataModule ?


Abaksoft

Recommended Posts

Dear Friends,

In my old Unigui project i notice a strange behavior:   store differences (item movements)
Probably an error on my part regarding SQL queries or Server power cuts.

However, I noticed, today to my dismay, that my Class was declared as TDataModule
and not TUniGUIMainModule (which is multi Sessions).

Could my store gap problem have come from there?
In other words:  will we now have to declare with Unigui all our classes :

  TMyclasse = class (TUniGUIMainModule)   ?
    .....
  end;

 

and not in

  TMyclasse = class (TDataModule)
    .....
  end;

______________

Note : The application is Multi users environment.

Edit :  My old Class (TDataModule)  contain Concurrent SQL queries !!!

Big Thx

Link to comment
Share on other sites

Auto answer : 

1. we have to use TDataModule generated by Unigui Application.

2. Conserning my store gab problem, i found that i am using the same DBQuery component on mainModule, for all concurrent queries sessions (a bad old habit)

The safe way is to create on the fly DBQuery inside a trandaction and free it at the end.

sorry for any enconvenience.

 

 

 

Link to comment
Share on other sites

  • 4 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...