Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Paradox Version Number of a table 1

Status
Not open for further replies.

Stretchwickster

Programmer
Apr 30, 2001
1,746
GB
Hi,

Is it possible to access the Paradox version number of a table at run-time?

Your help would me much appreciated :)
 
Stretchwickster,

Yes, as shown in this very crude (and quickly tossed together example:

Code:
uses BDE;

function GetTableLevel(DBHandle: hdbiObj; var TableLevel: longint): word;
begin
  Result := 0;
  Check( DbiGetProp( hdbiObj( DBHandle ), curTableLevel, @TableLevel,
      sizeof(TableLevel), Result));
end;

procedure TForm1.Button1Click(Sender: TObject);
var
   liLevel : LongInt;
begin
   getTableLevel(  hdbiObj( Table1.Handle ), liLevel );
   showMessageFmt( '%s is a Level %u table.',
                   [  Table1.TableName, liLevel ] );
end;

Note: This assumes a) a recent version of Delphi, b) you're using tBDEDatasets to connect to your Paradox data, c) that the dataset is active and actually points to a Paradox table. You'll probably want more error-checking in your final application.

Hope this helps...

-- Lance
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top