1{
2    Copyright (c) 1999-2000 by Pavel Stingl <stingp1.eti@mail.cez.cz>
3
4
5    Test program for OraOCI units
6
7    See the file COPYING.FPC, included in this distribution,
8    for details about the copyright.
9
10    This program is distributed in the hope that it will be useful,
11    but WITHOUT ANY WARRANTY; without even the implied warranty of
12    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13
14 **********************************************************************}
15program test01;
16
17uses
18  oraclew,
19  oci,oratypes;
20
21{$H+}
22
23{
24    Constants user, pass & tnsc you must set by hand to values,
25    which you prefer.
26
27    user = username
28    pass = password
29    tnsc = TNS connect string
30 **********************************************************************}
31
32const
33  user = 'every';
34  pass = 'tisova';
35  tnsc = 'etil.world';
36
37var
38  x : integer;
39  p : integer;
40begin
41  OraInit;
42  OraLogin(user,pass,tnsc);
43  OraSQLExec('select sysdate from sys.dual');
44  writeln(OraGetFieldName(1):20);
45  p := OraGetFieldCount;
46  for x := 1 to p do
47  write(OraGetFieldName(x), ';');
48  WriteLn;
49  while OraNext do
50  begin
51    for x := 1 to p do
52      write(OraGetFieldAsString(x), ';');
53    writeln;
54  end;
55
56  OraLogout;
57  OraFin;
58end.
59