Forum > Databases

datamodul "unit not used" (IBX)

<< < (2/4) > >>

Nicole:
I think so as well.
But how to get rid of the compiler hint and - why is it there?

wp:
My impression is: If you work with the datamodule only at designtime, you do not need to add its unit to the uses clause, because the IDE magically knows about it.

But when you access any of its components and their properties at runtime (i.e. by your own code) you must add the unit to "uses".

To get rid of the warning, right-click on the message in the message window and select "Hide message by inserting IDE directive {%H-}".

Nicole:
thank you, I will do this.

rvk:

--- Quote from: Nicole on December 01, 2022, 03:26:51 pm ---But how to get rid of the compiler hint and - why is it there?

--- End quote ---
My guess it has to do with the frames.
You mentioned that you use TFrame.

In that case you need the datamodule name in the uses clause of the frame. Not in the uses clause of the actual unit on which you drop the frame.
(unless you mention the database component in the source, in which case there shouldn't be a hint)

Nicole:
Yes, I work with frames.
Thank you, that you remember this.

No, the database-module is in no way in the source.
Just in the object inspector at design time (I am so glad about).

btw:
Is an IBQuery "very" costly?
Sometimes I wonder if I shall use a several IBQueries or if to re-use the existing ones (and cross fingers, they do never interact).
Mostly I re-use them. There are about 3 IBQueries a frame, dependent on what it does.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version