Miscellaneous => Suggestions => Topic started by: krzynio on February 11, 2013, 11:32:10 am

Title: Data module
Post by: krzynio on February 11, 2013, 11:32:10 am

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?

Title: Re: Data module
Post by: Zoran 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?
Title: Re: Data module
Post by: taazz 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.
TinyPortal © 2005-2018