During runtime, how do we load and save forms to the database?

My purpose is to structure a programme similar to the application at MSACCESS.

omeronderAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

omeronderAuthor Commented:
Adjusted points to 300
0
rwilson032697Commented:
Listening
0
rwilson032697Commented:
How will you create the forms you are saving?

Cheers,

Raymond.
0
Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

omeronderAuthor Commented:
example : ready forms in delphi compiler.
0
rwilson032697Commented:
You can store a form in a blob field, like this:

TBlobField(Dataset.FieldByName('Form')).LoadFromFile(FileName);

And save it back to a form file like this:

TBlobField(Dataset.FieldByName('Form')).SaveToFile(FileName);

You can load a form (generically) and show it something like this:

var
  Form : TForm;

Form := TForm.Create(Application);
ReadComponentResFile(FileName, Form);
Form.Show;

Be aware though that if the form or its components have assigned events then this will fail.

Cheers,

Raymond.

0
omeronderAuthor Commented:
sorry my english is poor.

i will create in delphi compiler. but i will save it in my database on runtime.
0
rwilson032697Commented:
OK - does my comment help you? Give it a try and let me know...

Cheers,

Raymond.
0
ptmcompCommented:
I agree with Raymond. I think it's not that easy because there are also reference fix ups and inheritance.
0
rwilson032697Commented:
You can cope with both inheritance and reference fixups, but you do need to jump through hoops and modify the VCl code to do it.

Cheers,

Raymond.
0
intheCommented:
listening..
0
omeronderAuthor Commented:
Raymond,

can you send me an example (basic) project?

e-mail : omeronder@hotmail.com



0
rwilson032697Commented:
Well there's nothing really more to do. Just create a table containing a blob field and use the snippets above to save/load the from to/from the field and to show the form...

I can throw this together if that's what you need...

Cheers,

Raymond.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
omeronderAuthor Commented:
ok...
here your points...

thanks for your help, Raymond.
0
rwilson032697Commented:
Um - OK. I was quite happy to wait until you had it working before you graded...

Cheers,

Raymond.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Delphi

From novice to tech pro — start learning today.