Recent

Author Topic: Data module  (Read 6214 times)

krzynio

  • Jr. Member
  • **
  • Posts: 99
    • Krzynio's home page
Data module
« on: February 11, 2013, 11:32:10 am »
Hi!

I put any database connection componet i.e. TZConnection on datamodule and this is the only component on this datamodule.
I put any query component on another form. The datamodule is included in uses clause in this form.
From designer level I cannot assign this connection component to this query.Connection property.
From code it is of course possible and it works query.Connection := datamodule.connection.
But is enough to put any query component on datamodule and assigning the connection to the query component from form from designer level works fine.
Is it a bug in Lazarus or I am untutored in something?

Regards,
Krzynio
Ubuntu 23.10 x64, / Windows 11 PL - latest updates
Lazarus 2.2.6, FPC 3.2.2

Zoran

  • Hero Member
  • *****
  • Posts: 1829
    • http://wiki.lazarus.freepascal.org/User:Zoran
Re: Data module
« Reply #1 on: February 11, 2013, 01:33:56 pm »
I cannot reproduce with neither Lazarus 1.0.7 fixes, nor Lazarus 1.1 (rev. 40260), Windows 7.

I open new project, then add new data module, put ZConnection on it and ZQuery on the main form. Then in object inspector I can select ZConnection1 in ZQuery1.Connection property.
This is all I did, I didn't even need to add unit2 (the one with data module) to uses list in unit1.

Which Lazarus version do you have? And which os?

taazz

  • Hero Member
  • *****
  • Posts: 5368
Re: Data module
« Reply #2 on: February 11, 2013, 07:36:47 pm »
you need to have the datamodule open in your ide in order to be able to select the connection in it.
Good judgement is the result of experience … Experience is the result of bad judgement.

OS : Windows 7 64 bit
Laz: Lazarus 1.4.4 FPC 2.6.4 i386-win32-win32/win64

 

TinyPortal © 2005-2018