Solved

Creating Tables without OWNERS

Posted on 1997-04-17
7
198 Views
Last Modified: 2010-04-04
How do I create a table in a unit (not a form)? When I try the following:-
var
    TableDefaults: TTable;
begin
    TableDefaults              := TTable.Create(Self);
I get an error - Undeclared identifier 'Self'
Am I neglecting to put a unit in the uses clause?
0
Comment
Question by:Eric Kay
  • 3
  • 2
  • 2
7 Comments
 
LVL 2

Accepted Solution

by:
javiertb earned 50 total points
ID: 1335429
You have to include 'DbTables' unit in your uses clause.
0
 

Author Comment

by:Eric Kay
ID: 1335430
The following uses clause already exists:-
uses
  SysUtils, StdCtrls, DB, Dialogs, Forms, DBTables, ExtCtrls, Classes;
however it still doesn't work.
0
 

Author Comment

by:Eric Kay
ID: 1335431
The following uses clause already exists:-
uses
  SysUtils, StdCtrls, DB, Dialogs, Forms, DBTables, ExtCtrls, Classes;
however it still doesn't work.
0
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 3

Expert Comment

by:mheacock
ID: 1335432
Someone has to own the TTable, I believe.

How about:

    TableDefaults := TTable.Create(Form1);

You might need Form1.Handle...whatver type self is.

If this works, please reject previous answer and invite me to repost this comment as an answer.
0
 
LVL 2

Expert Comment

by:javiertb
ID: 1335433
You have to do this:

   TableDefaults:=TTable.Create(TableDefaults);

This works.
0
 
LVL 3

Expert Comment

by:mheacock
ID: 1335434
I stand corrected...you got an answer that works...that's most important.
0
 
LVL 2

Expert Comment

by:javiertb
ID: 1335435
Helloooo, anybody there to grade the question?? 8-)
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now