SHARE
TWEET

Untitled

a guest Jun 15th, 2017 55 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. program Project1;
  2.  
  3. uses
  4.   Forms,
  5.   Unit1 in 'Unit1.pas' {Form1};
  6.  
  7. {$R *.res}
  8.  
  9. begin
  10.   Application.Initialize;
  11.   Application.MainFormOnTaskbar := True;
  12.   Application.CreateForm(TForm1, Form1);
  13.   if Form1.Init then
  14.     Application.Run;
  15. end.
  16.  
  17.  
  18. unit Unit1;
  19.  
  20. interface
  21.  
  22. uses
  23.   Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  24.   Dialogs, ZConnection;
  25.  
  26. type
  27.   TForm1 = class(TForm)
  28.     procedure FormCreate(Sender: TObject);
  29.     procedure FormDestroy(Sender: TObject);
  30.   private
  31.     FConnection: TZConnection;
  32.     { Private-Deklarationen }
  33.   public
  34.     function Init: Boolean;
  35.     { Public-Deklarationen }
  36.   end;
  37.  
  38. var
  39.   Form1: TForm1;
  40.  
  41. implementation
  42.  
  43. {$R *.dfm}
  44.  
  45. procedure TForm1.FormCreate(Sender: TObject);
  46. begin
  47.   FConnection := TZConnection.Create(Self);
  48. end;
  49.  
  50. procedure TForm1.FormDestroy(Sender: TObject);
  51. begin
  52.   FConnection.Free;
  53. end;
  54.  
  55. function TForm1.Init: Boolean;
  56. begin
  57.   FConnection.HostName := ;
  58.   FConnection.Port := ;
  59.   FConnection.Database := ;
  60.   FConnection.User := ;
  61.   FConnection.Password := ;
  62.   FConnection.Protocol := 'postgresql';
  63.   FConnection.Connected := True;
  64.   Result := False;
  65. end;
  66.  
  67. end.
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top