[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 164
  • Last Modified:

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.

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

Cheers,

Raymond.
0
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
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
 
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

Featured Post

Learn to develop an Android App

Want to increase your earning potential in 2018? Pad your resume with app building experience. Learn how with this hands-on course.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now