~ubuntu-branches/ubuntu/feisty/fpc/feisty

« back to all changes in this revision

Viewing changes to fcl/db/unmaintained/odbc/testfl.pp

  • Committer: Bazaar Package Importer
  • Author(s): Torsten Werner
  • Date: 2007-01-27 20:08:50 UTC
  • mfrom: (1.2.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20070127200850-9mrptaqqjsx9nwa7
Tags: 2.0.4-5
* Fixed Build-Depends.
* Add myself to Uploaders in debian/control.
* Make sure that the sources are really patched before building them.
* Build unit 'libc' on powerpc too.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
program testfl;
 
2
{$mode objfpc}
 
3
uses fpodbc,Classes;
 
4
 
 
5
var
 
6
  Conn : TODBCConnection;
 
7
  FieldNames : TStringList;
 
8
  I : Integer;
 
9
 
 
10
begin
 
11
  Conn:=TODBCConnection.Create(Nil);
 
12
  Try
 
13
    Conn.DSN:='FPC';
 
14
    Conn.Active:=True;
 
15
    FieldNames:=TStringList.Create;
 
16
    FieldNames.Sorted:=True;
 
17
    Try
 
18
      Conn.GetFieldNames('FPDev',FieldNames);
 
19
      Writeln('Found ',FieldNames.Count,' Fields in table FPDev : ');
 
20
      For I:=0 to FieldNames.Count-1 do
 
21
        Writeln(FieldNames[i]);
 
22
    finally
 
23
      FieldNames.Free;
 
24
    end;
 
25
    Conn.Active:=False;
 
26
  Finally
 
27
    Conn.free;
 
28
  end;
 
29
end.