Lazarus

Programming => Databases => Topic started by: micheus on July 05, 2013, 01:34:20 am

Title: [SOLVED] Datasources in a datamodule aren't available for one form
Post by: micheus on July 05, 2013, 01:34:20 am
I started a small project with 1 DM and 4 Forms (3 of them using the DM). All was fine and suddenly only the login form doesn't "see" the components into the DM anymore.

I tried to add new TDBEdits and in the DataSource property I always see (none).
In the source code I'm able to type damMain. plus any component name inside it and the auto complete fills it correctly. (and yes, I added the DM in the Uses clausule of the form  ::))

So, is there any "special" file used by Lazarus that could be corrupted or something else?
Any idea about what happened?

Thanks
Micheus
Title: Re: Datasources in a datamodule aren't available for one form
Post by: Pascaluvr on July 05, 2013, 03:46:54 am
Is your Datasource in the DataModule ENABLED?
Title: Re: Datasources in a datamodule aren't available for one form
Post by: micheus on July 05, 2013, 09:16:36 pm
Pascaluvr, thank you for answer.

Yes, and I checked it again.
The problem is already present at design-time and only with this specific form (that was working before).
You can see it on this (https://www.dropbox.com/s/xmueacab4hayiuw/lazarus-dm-issue.avi) 41s video I made for better show my issue.
I'm finding I'll need to rebuild this form.  :(
Title: Re: Datasources in a datamodule aren't available for one form
Post by: micheus on July 05, 2013, 09:31:09 pm
Just now, it has occurred me try to remove the file from project and add it back - It worked!  :D
- File->Remove from project;
- I commented any reference in the other files to this form;
- Rebuild the project CTRL+F9;
- After checked OK, File->Save All and Quit from Lazarus;
- Load Lazarus again;
- Load the problematic file and File->Add Editor File to Project...

... and I already was able to see the datamodules on that DM.

So, it seems there is some extra information, in some place, being used by Lazarus.  :-\
Title: Re: [SOLVED] Datasources in a datamodule aren't available for one form
Post by: otorres on July 06, 2013, 12:03:18 am
I actually use the DataSet's in DataModule and the DataSource's in the Form that need connect to DataSet.

Regards.
TinyPortal © 2005-2018