Master/Detail

How can i make master/detail using
TQuery and i want mytable query can save,cancel,delete,append .
I want detail that syntax and
the related properties which influence
that Query

thanks
hertantoAsked:
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.

daniel_cCommented:
Why don't use TTable instead of TQuery and use Filter for Subtitution of 'WHERE' in TQuery?
Anyway, if you use TQuery as the backbone of your dbGrid, you can't do any data manipulation(Add/Save/Delete/Append).
0
AlphomegaCommented:
I have found that on Inprise.com:

   NUMBER  :  2895
  PRODUCT  :  Delphi
  VERSION  :  1.0
       OS  :  Windows
     DATE  :  May 21, 1996                          

    TITLE  :  How to check for app already running.

Q:  How can I write my Delphi program to detect if there is
already another copy running and exit if so?

A:  Create a unit called PrevInst and add it to your uses clause.  
Here's the code:

 unit PrevInst;

 interface

 uses
  WinTypes, WinProcs, SysUtils;

 type
  PHWND = ^HWND;
  function EnumFunc(Wnd:HWND; TargetWindow:PHWND): bool; export;
  procedure GotoPreviousInstance;

 implementation

  function EnumFunc(Wnd:HWND; TargetWindow:PHWND): bool;

  var
    ClassName : array[0..30] of char;
  begin
    Result := true;
    if GetWindowWord(Wnd,GWW_HINSTANCE) = hPrevInst then
    begin
      GetClassName(Wnd,ClassName,30);
      if StrIComp(ClassName,'TApplication') = 0 then
      begin
        TargetWindow^ := Wnd;
        Result := false;
      end;
    end;
  end;

  procedure GotoPreviousInstance;
  var
    PrevInstWnd : HWND;
  begin
    PrevInstWnd := 0;
    EnumWindows(@EnumFunc,longint(@PrevInstWnd));
    if PrevInstWnd <> 0 then

      if IsIconic(PrevInstWnd) then
        ShowWindow(PrevInstWnd, SW_RESTORE)
      else
        BringWindowToTop(PrevInstWnd);
  end;

  end.

And then make the main block of your *.DPR file look
something like this--

begin
  if hPrevInst <> 0 then
    GotoPreviousInstance
  else
  begin
    Application.CreateForm(MyForm, MyForm);
    Application.Run;
  end;
end.

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
kretzschmarCommented:
hi Alphomega,

seems, that you missed the right q ;-)

hi hertanto,
please evaluate my answer in your q
http://www.experts-exchange.com/bin/Q.10229933

before i give you additional advise to this q
(there are more ways possible)

meikl ;-)
0
AlphomegaCommented:
Sorry for my mistake ...

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