DataModule link durring design time lazarus / 16-Databases ---------------------------------------------------------------------- Skot · 2006-02-14 15:53 Hello again, One little thing, maybe it should be a want.  When I build apps, usually like to put all my Queries and DataSources etc in a DataModule.  However, in design time, I can't see how to get objects, like TdbGrid, to recognise a DataSource in the DM.  If I type DM.dsBlah in the DataSource param I get an error message, 'Invalid Propery Value', but it shouldn't be.  The DM unit is in the Uses clause.  Is there something else I need to do, or is this just the way it is? Not a big deal, I always write it into the CreateForm proc anyway, just would be convenient sometimes. Cheers. ---------------------------------------------------------------------- hadelmestre · 2009-07-05 18:00 Por lo que tengo entendido, el equipo de desarrollo estaria solucionando esta instancia o "bug". Es decir, por ahora no funciona Atte. Hectorr ---------------------------------------------------------------------- clauslack · 2009-07-05 22:56 In my case I have in the Object Inspector this property, without problems. In design time, SQLQuey1 (Form1) Database -> FormDatos.IBConnection1 FormDatos is a TDataModule. With Lazarus 0.9.27 and fpc 2.2.4 /2.2.5 ---------------------------------------------------------------------- Lord_ZealoN · 2009-07-06 07:48 Quote from: Skot on February 14, 2006, 04:53:27 pmHello again, One little thing, maybe it should be a want.  When I build apps, usually like to put all my Queries and DataSources etc in a DataModule.  However, in design time, I can't see how to get objects, like TdbGrid, to recognise a DataSource in the DM.  If I type DM.dsBlah in the DataSource param I get an error message, 'Invalid Propery Value', but it shouldn't be.  The DM unit is in the Uses clause.  Is there something else I need to do, or is this just the way it is? Not a big deal, I always write it into the CreateForm proc anyway, just would be convenient sometimes. Cheers. Are you using lazarus 0.9.26-2? With svn version works ok. ---------------------------------------------------------------------- musicones · 2009-09-07 07:42 Hello, I have the same problem (using Lazarus 0.9.26-2 / FPC 2.2.2). But I know that it should work, because I have one link from Transaction in ContactModule to the TIBConnection in DatabaseModule. >> It's all about the Design-Mode. << Here is my design: DatabaseModule: TDataModule contains: TIBConnection, TTransaction ContactsModule: TDataModule contains:   TTransaction -> linked to DatabaseModule.IBConnection (don't ask how/why the linking worked, i don't know)   TSQLQuery -> linked to TTransaction on same Module Now I have tried two different approaches. In both cases one link doesnt work: 1. TDataSource placed in ContactsModule and linked to TSQLQuery     Trying to link from ContactsForm.Grid.DataSource to ContactsModule.DataSource doesn't work 2. TDataSource placed in COntactsForm, linked to Grid     Trying to link from ContactsForm.DataSource.DataSet to ContactsModule.SQLQuery doesn't work. What means doesn't work: in uses part the according unit is set, e.g in ContactsForm .... uses mContacts (ContactsModule) 1. The link is not shown in Object Inspector e.g. when you click on DataSource or DataSet 2. Trying to write it manually tends to result in error Message: 'Invalid Propery Value' If someone knows the trick.... ---------------------------------------------------------------------- musicones · 2009-09-10 07:03 Hi again, i've tried Lazarus 0.9.27 Snapshot of yesterday. There it seems to work. So i suppose an bug in current release. I will wait for next release then. Edit: I have found out why that doesn' work as i expected. Usually i use to create and free the Datamodules myself runtime where i need them. Therfore you have to throw out the Create in the project file. If you do that, the controls do not recognize the DataSources and Querys in the Datamodule. I used to do that in Delphi where it works without problems. It seems that Lazarus doesn't support it. regards musicones