Questions tagged [datamodule]

A Data Module (TDataModule) is a class in Delphi which represents a non-visual form, only allowing non-visual components. Data Modules are often used to encapsulate common business rule, components commonly used across an application, and are used as a base for various infrastructures, such as a Service (TService) or a Web Module (TWebModule).

A Data Module (TDataModule) is a class in Delphi which represents a non-visual form, only allowing non-visual components. Data Modules are often used to encapsulate common business rule, components commonly used across an application, and are used as a base for various infrastructures, such as a Service (TService) or a Web Module (TWebModule).

64 questions
1
vote
4 answers

How to connect in a firebird database in execution time?

I'm having a hard time to make my code work. I want to connect to a database with my application in Delphi 7, but if I change the folder of the application, for example, if I install in another computer, my datamodule stops working. The error is:…
Vitor Rangel
  • 363
  • 1
  • 4
  • 13
1
vote
5 answers

Class TADOConnection / TADOTable Not Found

Okay, so my application was working just fine until I decided to clean up the design-time form a bit by creating a DataModule form and moving all database components to it. I'm using Delphi XE2 Update 1 and these components, TADOConnection,…
James L.
  • 9,384
  • 5
  • 38
  • 77
1
vote
1 answer

Delphi, When a datamodule loads I like to prevent the TFDConnector from connecting if I mistakenly have the activate set true

It often happens, to me, that after testing and making a build while I forget to check the activate property first. Then when I install the program on a different system an exception occurs due to failed connection. It's really annoying. I've…
larand
  • 773
  • 1
  • 9
  • 26
1
vote
0 answers

Best practices for binding MVC model to WCF service through "datamodule"?

I'm somewhat of a noob, so bear with me please. I'm building an MVC project that gets data from a web service (WCF) as exposed by a "datamodule" class that passes parameters to the service. Right now what I have is a viewmodel that looks like…
1
vote
0 answers

Creating a datamodule in background thread

I have a TDatamodule that has a TImageCollection (70 images) and 3 TVirtualImageLists. Its creation take a lot of time. The .dfm file measures slightly over 400 kB. I'd like to autocreate this datamodule because the images are used throughout the…
Jan Doggen
  • 8,799
  • 13
  • 70
  • 144
1
vote
1 answer

access a component on one of tabsheets from datamodule

Maybe trivial,but can't seem to figure it out.... I am using RAIZE components i.e rzPageControl1 and one of my sheets is called PRO.It (rzPageControl1) resides on Form1. Now,I have an cxTextEdit4 on that sheet which I need to access from…
user763539
  • 3,509
  • 6
  • 44
  • 103
1
vote
1 answer

Why do datasource of database-controls dissapear when Delphi crashes

I'm using Delphi 10.4.1 Enterprise and wrote a VCL program using an SQLite database. As I suspect a OneDrive issue, I mention that the source code folder is part of the zone managed by OneDrive. At times, whilst debugging, my Delphi program hangs…
JGMS
  • 77
  • 10
1
vote
1 answer

Why does TDataModule not execute actions when I hit shortcut?

Shortcut-handling module of my application contains some sort of 'global' hotkeys, that are linked to their own actions in action list in TDataModule. I did so, because it is part of shortcut persistence and editing system I have. So, any TAction I…
Maxim Popravko
  • 4,100
  • 3
  • 29
  • 43
1
vote
1 answer

When do I need to free a Data Module created by the Application?

i have the code as follows: begin Application.Initialize; Application.Title := 'Controle Bancário'; Application.CreateForm(T_DMEstagio, _DMEstagio); Application.CreateForm(T_frmLogin, _frmLogin); if (_frmLogin.ShowModal = 1) then …
1
vote
1 answer

Keyboard shortcuts not caught when Action Manager is in Data Module?

In Delphi XE2, I have a Data Module in my Application, and an Action Manager inside that Data Module. I've assigned Keyboard Shortcuts to each action, but when I try to use these shortcuts in the app, it does not catch them. I'm creating the data…
Jerry Dodge
  • 26,858
  • 31
  • 155
  • 327
1
vote
0 answers

Delphi - generic datamodule

I am trying to define generics datamodule, something like this: TDM = class(TDataModule) public function GetValue:T;virtual;abstract; end; But when I do this, Delphi misunderstood the datamodule and thinks its form (adds form properties like…
Dave
  • 83
  • 1
  • 4
1
vote
2 answers

Data Module in Dll with delphi?

I created a database program which has a problem. I used Borland Delphi 7.x My Question is "How to create a data module in Dll (Dynamic Link Library) With Delphi?
Tobassum Munir
  • 373
  • 1
  • 7
  • 14
1
vote
1 answer

Manipulate Database from Drupal

I'm new to Drupal 7. Right now I'm trying to use D7 to build an interface that allows me to directly manipulate the tables in the database. I have installed a couple modules such as Data, Migrate, Feeds, and etc. I managed to create a view to…
lusketeer
  • 1,890
  • 1
  • 12
  • 29
0
votes
1 answer

Delphi - Error in using TTable in DataModule in DLL

I have an app that works fine... Porting it to be implemented as a DLL. I have a datamodule that has my Database and TTable components on it... In Design mode, the Database is set to Active. Tables point to the database, they are set to active. I…
user1009073
  • 3,160
  • 7
  • 40
  • 82
0
votes
2 answers

Determine previous month value based on Month column

I have a data set with one measure, and two categories (Month, Product). What I want to achieve is the following view in a data module: I want to have a column which shows me the value of Month-1 based on Month in Column Month (e.g. May 2023 ->…