Recent

Author Topic: SQLquery - must it be in the same frame as the database?  (Read 570 times)

Nicole

  • Hero Member
  • *****
  • Posts: 972
SQLquery - must it be in the same frame as the database?
« on: August 23, 2022, 01:11:46 pm »
IBX

In my frames I generate queries by topic.
Unfortunately I cannot set them to the database which is defined in my db-modul.

Is it allowed to have a SQLquery to set the database within the properties to a different unit?

tonyw

  • Sr. Member
  • ****
  • Posts: 321
    • MWA Software
Re: SQLquery - must it be in the same frame as the database?
« Reply #1 on: August 23, 2022, 01:54:08 pm »
Try adding the unitname of your data module to the uses clause of your form. Then save the form and try again.

MarkMLl

  • Hero Member
  • *****
  • Posts: 6692
Re: SQLquery - must it be in the same frame as the database?
« Reply #2 on: August 23, 2022, 02:05:57 pm »
I don't see why. However, I think the basic rules of frames apply:

i) Set the properties of components when editing the frame.

ii) Do not set the properties of components in a frame from the form editor.

iii) If you need properties with values other than (i) above, do it at runtime after the form (hence the frame or frames it contains) has been fully initialised.

MarkMLl
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

Nicole

  • Hero Member
  • *****
  • Posts: 972
[solved] Re: SQLquery - must it be in the same frame as the database?
« Reply #3 on: August 23, 2022, 07:00:45 pm »
Thank you for the answers.

I have a working solution in my frame now, so it works as such.
A new Query did it.

The specific query refused to "see" the DB.
Nobody knows why, and we never will learn it, because I deleted it.

 

TinyPortal © 2005-2018