Welcome, Guest
Username: Password: Remember me
Components and Libraries for Database Development, discussions, problems and suggestions
  • Page:
  • 1

TOPIC:

Data components in form don't see data module 4 years 2 months ago #15025

  • J. M. Dias Costa
  • J. M. Dias Costa's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 4
  • Thank you received: 0
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.

Data components in form don't see data module 4 years 2 months ago #15026

  • Matis A.
  • Matis A.'s Avatar
  • Away
  • Moderator
  • Moderator
  • Posts: 1106
  • Thank you received: 162
Thanks
but we need more info:
-Your OS and CPU
-Your CT version
-Your source sample with the problem
etc
PilotLogic Core Programmer

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

Last edit: by Matis A..

Data components in form don't see data module 4 years 2 months ago #15027

  • J. M. Dias Costa
  • J. M. Dias Costa's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 4
  • Thank you received: 0
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:

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

Last edit: by J. M. Dias Costa.

Data components in form don't see data module 4 years 2 months ago #15028

  • Matis A.
  • Matis A.'s Avatar
  • Away
  • Moderator
  • Moderator
  • Posts: 1106
  • Thank you received: 162
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:
The following user(s) said Thank You: J. M. Dias Costa

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

Last edit: by Matis A..

Data components in form don't see data module 4 years 2 months ago #15029

  • J. M. Dias Costa
  • J. M. Dias Costa's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 4
  • Thank you received: 0
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.

Data components in form don't see data module 4 years 2 months ago #15030

  • Matis A.
  • Matis A.'s Avatar
  • Away
  • Moderator
  • Moderator
  • Posts: 1106
  • Thank you received: 162
Thanks
Have fun
PilotLogic Core Programmer

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

  • Page:
  • 1