Recent

Author Topic: [SOLVED] Datasources in a datamodule aren't available for one form  (Read 2010 times)

micheus

  • Jr. Member
  • **
  • Posts: 62
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
« Last Edit: July 05, 2013, 09:32:40 pm by micheus »

Pascaluvr

  • Full Member
  • ***
  • Posts: 216
Re: Datasources in a datamodule aren't available for one form
« Reply #1 on: July 05, 2013, 03:46:54 am »
Is your Datasource in the DataModule ENABLED?
Windows 7, Lazarus 1.0.8, FPC 2.6.2, SQLite 3

micheus

  • Jr. Member
  • **
  • Posts: 62
Re: Datasources in a datamodule aren't available for one form
« Reply #2 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 41s video I made for better show my issue.
I'm finding I'll need to rebuild this form.  :(

micheus

  • Jr. Member
  • **
  • Posts: 62
Re: Datasources in a datamodule aren't available for one form
« Reply #3 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.  :-\

otorres

  • Jr. Member
  • **
  • Posts: 94
Re: [SOLVED] Datasources in a datamodule aren't available for one form
« Reply #4 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.