How to refer to database components in a datamodule?
We are using:
Lazarus 0.918 (currently on MSWindows, hoping to recompile in Linux later) with IB/Firebird and SQLdb components.
The components work well on single form database applications, but now we would like to use several data entry forms with ShowModal and keep all the database components on a DataModule.
Step by step problem:
1) file | new | datamodule
2) place SQLdb components on datamodule
3) form1 uses datamodule1
4) place dbgrid1 on form1
In object inspector dbgrid1.datasource does not show selection "fdatamodule1.datasource1".
If entered by keyboard, Lazarus responds "invalid property value".
If this line ("dbgrid1.datasource := fdatamodule1.datasource1")
is placed in form1.FormShow, the Error reports "project raised exception class External SIGSEGV".
In Delphi, "uses datamodule1" allows the dbgrid to show a selection of components in the datamodule.
How to do this in Lazarus? What are we leaving out? We've tinkered with a few things, but nothing has worked yet. Please give step by step example and/or web references to examples, if possible - Thanks again... :-)
Be a better Heartthrob. Get better relationship answers from someone who knows. Yahoo! Answers - Check it out.