× Components and Libraries for Database Development, discussions, problems and suggestions

Question Data components in form don't see data module

  • J. M. Dias Costa
  • Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
More
4 weeks 20 hours ago #15025 by J. M. Dias Costa
Data components in form don't see data module was created by J. M. Dias Costa
Hello,

In a project I have several forms that access the database (PostgreSQL) through a data module.
All work fine except 2 which, although in the uses clause they refer to the data module, they do not "see" datasources in there when I try to assign datasource to the data components.
Is there any mistake I made? Is there anything I can do to avoid redoing the forms?

Thanks in advance
Dias Costa

Please Log in or Create an account to join the conversation.

More
4 weeks 19 hours ago - 4 weeks 19 hours ago #15026 by Matis A.
Replied by Matis A. on topic Data components in form don't see data module
Thanks
but we need more info:
-Your OS and CPU
-Your CT version
-Your source sample with the problem
etc

PilotLogic Core Programmer
Last edit: 4 weeks 19 hours ago by Matis A..

Please Log in or Create an account to join the conversation.

  • J. M. Dias Costa
  • Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
More
4 weeks 14 hours ago - 4 weeks 14 hours ago #15027 by J. M. Dias Costa
Replied by J. M. Dias Costa on topic Data components in form don't see data module
Hello,

but we need more info:
-Your OS and CPU
Me: Windows 10, Intel Core i5 4670
-Your CT version Me: 7.1
-Your source sample with the problem
Me: see the attached file conta.zip

File Attachment:

File Name: conta.zip
File Size:122 KB




// This is a partial list of files in the project
// compressed in the attached file conta.zip
// The bin directory is important
// The file menu_image.jpg will help you
//
//
contas.ctpr // project
contas.ctps
contas.ico
contas.pas
contas.res
meu_layout.xml

//tree menu (see attached picture file: menu_image.JPG)
u_menu_contas.frm
u_menu_contas.pas


// data module (for the database PostgreSQL)
u_dm_movimentos.frm
u_dm_movimentos.pas

// The data module reads base-conta.ini file with information for connect to the database

// form working as desired (menu option: Edita Movimentos - CGD)
u_edita_cgd_movimentos.frm
u_edita_cgd_movimentos.pas
// subform of the previous form
u_prep_query_cgd_movimentos.frm
u_prep_query_cgd_movimentos.pas

// form where the problem of assigning datasource to components resides (menu option: de Cartões de Crédito)
u_edita_cc_nb_movimentos.ctrs
u_edita_cc_nb_movimentos.frm
u_edita_cc_nb_movimentos.pas
// sub form of the previous form
u_prep_query_cc_nb_movimentos.frm
u_prep_query_cc_nb_movimentos.pas
Attachments:
Last edit: 4 weeks 14 hours ago by J. M. Dias Costa.

Please Log in or Create an account to join the conversation.

More
4 weeks 12 hours ago - 4 weeks 12 hours ago #15028 by Matis A.
Replied by Matis A. on topic Data components in form don't see data module
Your fixed app conta1.zip attach

1) We:
-ADD to your Project
--u_edita_cc_nb_movimentos.pas and
--u_prep_query_cc_nb_movimentos.pas

-Remove from your project u_prepara_cgd_base_dados.frm



2) We move in u_edita_cc_nb_movimentos the declaration of u_dm_movimentos unit from "Implementation Uses" session to" Interface Uses"

3) Remove u_edita_cc_nb_movimentos.ctrs file it's useless.


4) Work OK now (Win 10 Ent 64Bits, LAB CT 7.2, Typhon64)









...

PilotLogic Core Programmer
Attachments:
Last edit: 4 weeks 12 hours ago by Matis A..
The following user(s) said Thank You: J. M. Dias Costa

Please Log in or Create an account to join the conversation.

  • J. M. Dias Costa
  • Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
More
4 weeks 10 hours ago #15029 by J. M. Dias Costa
Replied by J. M. Dias Costa on topic Data components in form don't see data module
Hi Matis A.
Thank you for your help.
It's working now.
Dias Costa

Please Log in or Create an account to join the conversation.

More
3 weeks 6 days ago #15030 by Matis A.
Replied by Matis A. on topic Data components in form don't see data module
Thanks
Have fun

PilotLogic Core Programmer

Please Log in or Create an account to join the conversation.