[View Borland Home Page][View Product List][Search This Web Site][View Available Downloads][Join Borland Online][Enter Discussion Area][Send Email To Webmaster]

BDE API Examples (DbiQGetBaseDescs)

DbiQGetBaseDescs returns the original database, table, and field names of the fields that make up the result set of a query.

Return the original database, table, and field names for a query.

This example uses the following input:
GetBaseDescs(Query2, Memo1.Lines);
procedure GetBaseDescs(Query: TQuery; List: TStrings);
var
  hCur: hDBICur;
  rslt: DBIResult;
  Descs: STMTBaseDesc;

begin
  hCur := nil;
  try
    // Look at DbiQGetBaseDescs in the BDE32.HLP for more information...
    Check(DbiQGetBaseDescs(Query.STMTHandle, hCur));
    repeat
      rslt := DbiGetNextRecord(hCur, dbiNOLOCK, @Descs, nil);
      if rslt = DBIERR_NONE then
        // Look at STMTBaseDescs in the BDE32.HLP for more information...
        List.Add(Format('DB Name: %s  Table Name: %s  Field Name: %s',
               [Descs.szDatabase, Descs.szTableName, Descs.szFieldName]))
      else
        if rslt <> DBIERR_EOF then
          Check(rslt);
    until rslt <> DBIERR_NONE;
  finally
    if hCur <> nil then
      check(DbiCloseCursor(hCur));
  end;
end;

Back to BDE API Reference Page

DISCLAIMER: You have the right to use this technical information subject to the terms of the No-Nonsense License Statement that you received with the Borland product to which this information pertains.
Trademarks & Copyright © 1998 Borland International, Inc.