Programalama > DELPHI

Etiketler: bde, ile, çalismak

Ort. 0
Puan ver:
uses DBTables; 
procedure TForm1.Button1Click(Sender: TObject);
 var CurrentAliases: TStringList;
begin
 CurrentAliases := TStringList.Create;
 Session.GetAliasNames(CurrentAliases);
 ComboBox1.Items:= CurrentAliases;
 CurrentAliases.Free;
end;



uses DBTables; 
...
var sMaybeAlias : string;
...
Session.IsAlias(sMaybeAlias)
...



uses dbtables;
procedure TForm1.Button1Click(Sender: TObject);
var sMaybeAlias : string;
    DBPath      : string;
    ParamList   : TStringList;
begin
sMaybeAlias := 'DBDEMOS';

if Session.isAlias(sMaybeAlias) then
begin
  ParamList := TStringList.Create;
  try
    Session.GetAliasParams(sMaybeAlias, ParamList);
    DBPath := ParamList.Values['PATH'];
  finally
    ParamList.Free;
  end;
  ShowMessage('Path to '+sMaybeAlias+' is '+DBPath);
end
else ShowMessage(sMaybeAlias+' is not an alias!');
end;




...
sNewAlias := 'MyNewParadoxAlias'
sDataDir := 'c:\MyApplication\NewDataDirectory'
Session.AddStandardAlias
   (sNewAlias, sDataDir, 'PARADOX');
...




uses dbtables;
procedure TForm1.Button1Click(Sender: TObject);
var AliasParams    : TStringList;
    AliasDirectory : string;
    AliasName      : string;
begin
 AliasDirectory:='c:\MyApp\Data\IBData.GDB';
 AliasName:='IBNewData';

 AliasParams := TStringList.create;
 try
   AliasParams.Values['SERVER NAME'] := DataFile;
   AliasParams.Values['USER NAME'] := 'SYSDBA';
   Session.AddAlias
      (AliasName, 'INTRBASE', AliasParams);
   Session.SaveConfigFile;
 finally
   AliasParams.Free;
 end;






Yorumlar                 Yorum Yaz
Bu hazır kod'a ilk yorumu siz yapın!
KATEGORİLER
ASP - 240
ASP.NET - 24
C# - 75
C++ - 174
CGI - 8
DELPHI - 247
FLASH - 49
HTML - 536
PASCAL - 246
PERL - 11
PHP - 160
WML - 9
XML - 2
Copyright © 2002 - 2024 Hazır Kod - Tüm Hakları Saklıdır.
Siteden yararlanırken gizlilik ilkelerini okumanızı tavsiye ederiz.
hazirkod.com bir İSOBİL projesidir.