Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 2 of 2 total
Thread Small utility routines
Tue, Dec 18 2007 11:59 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

I'm now working on getting my app running under EDB, after 10 months getting it converted to TMS controls, rewriting some utilities and it'll be so nice when this is all done and I can move ahead rather than just getting back to where I was.

OK grumbling over.

As I go I'll be writing some small utility routines to help, sometimes replacing functionality that has yet to reappear in ElevateDB from DBISAM. As I do I'll post the code in this thread - if its ever a lot of lines either I won't post it, or I'll post to the binaries.

Roy Lambert
Tue, Dec 18 2007 12:00 PMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

function DoesTableExist(sName,dName,tName :string):boolean;
var
Checker:TEDBQuery;
begin
Checker:= TEDBQuery.Create(nil);
try
Checker.SessionName := sName;
Checker.DatabaseName := dName;
 Checker.SQL.Text := 'SELECT * FROM Information.Tables WHERE Name = '+QuotedStr(tName);
 Checker.ExecSQL;
 Result := Checker.RecordCount > 0;
finally
Checker.Close;
Checker.Free;
end;
end;

Roy Lambert
Image