Delphi Pages Forums  

Go Back   Delphi Pages Forums > Delphi Forum > General

Lost Password?

Reply
 
Thread Tools Display Modes
  #1  
Old 06-23-2012, 09:16 AM
Marsheng Marsheng is offline
Senior Member
 
Join Date: Nov 2008
Posts: 205
Default What to open first, data module or form

In the past I have opened the data module first to ensure all the tables etc are open before the forms.

I'm now opening sql tables via the net and I need to load data (username, location etc) before I open the tables. I want to store that data in a config.ini file and read this when my apps opens, however, the DM has no memos or edit boxes for me to loadfromfile into ?

Any suggsetions on how to solve the issue - you may have a completely different way of solving this problem.
Reply With Quote
  #2  
Old 06-23-2012, 10:20 AM
Jasser Jasser is offline
Moderator
 
Join Date: Jan 2005
Location: Saudi Arabia
Posts: 4,773
Default

If your problem is reading/writing to ini files then see http://www.swissdelphicenter.ch/en/showcode.php?id=160
__________________
Regards,
Abdulaziz Jasser
Reply With Quote
  #3  
Old 06-24-2012, 10:47 AM
Marsheng Marsheng is offline
Senior Member
 
Join Date: Nov 2008
Posts: 205
Default

Same issue - connecting to the DB but another angle.

I have a login page - I read the ini file and pre-populate the edit boxes.

If I put the TMyConnection on the login page, the datamodule components can't find the tables, even if I add the fLogin to the uses list.

If I put the TMyConnection on the DM page and the call fLogin with the on create, I get an access violation message. I assume it is because the DM has not fully created itself and the components.

Any Suggestions ?

I guess having a window on the DM form would be the answer.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT. The time now is 01:07 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.