Board index » off-topic » Formless Tables
Richard Beilby
Delphi Developer |
Richard Beilby
Delphi Developer |
Formless Tables2004-10-21 09:36:28 PM off-topic16 I need to access (read and write) to a pre-existing table in a dll. This dll does not use forms and so needs to be able to "create" a formless table. Is this possible in BDE without getting memory or access violations? If so, what is the best why to achieve this? -- Regards, Richard Beilby. |
Bill Todd
Delphi Developer |
2004-10-21 09:53:04 PM
Re:Formless Tables
Your question is very confusing. You state that the table already
exists. In the next sentence you say that the DLL needs to create a "formless table" whatever that is. Why do you need to create a table if the table already exists? What do you mean by "formless table"? What database are you using? Since the BDE is no longer being developed and all of the SQL Link drivers have been deprecated why do you want to use it? -- Bill (TeamB) TeamB cannot answer questions received via email Richard Beilby wrote: QuoteI need to access (read and write) to a pre-existing table in a dll. |
Richard Beilby
Delphi Developer |
2004-10-21 10:10:12 PM
Re:Formless Tables
Bill,
Thanks for your reply. To explain: I am using a Paradox database and the application is quite old and works well. I what to be able to read from and write to a Paradox table using the BDE in a dll that does not have any forms. I want to do something equivalent to "Form1.Table1.create", but, without encompassing the table in a form. I am presuming that the create statement allocates memory to the table. Am I correct? I hope this explains the question more clearly. -- Regards, Richard Beilby. {smallsort} |
Bill Todd
Delphi Developer |
2004-10-21 10:19:12 PM
Re:Formless Tables
A little. It sounds like you want to create a TTable component. To do
that all you need is: var MyTable: TTable; begin MyTable := TTable.Create(nil); -- Bill (TeamB) TeamB cannot answer questions received via email Richard Beilby wrote: QuoteI hope this explains the question more clearly. |
Richard Beilby
Delphi Developer |
2004-10-21 10:35:18 PM
Re:Formless Tables
Bill,
That's it, thanks. So I don't have to allocate memory then? So, from here I can name the database and table and then use as normal. -- Regards, Richard Beilby. |
Bill Todd
Delphi Developer |
2004-10-21 11:53:43 PM
Re:Formless Tables
You never have to allocate memory when creating an instance of a
component. The constructor (Create method) does that for you. You must make sure that you free the component instance or you will have a memory leak. Once you have created the TTable instance you use it just as you would in an EXE. -- Bill (TeamB) TeamB cannot answer questions received via email Richard Beilby wrote: QuoteBill, |