-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathroutine_db.pas
43 lines (32 loc) · 885 Bytes
/
routine_db.pas
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
unit routine_db;
interface
uses Messages, Dialogs, SqlExpr;
function FieldID(name:string; query:TSQLQuery): integer; overload;
function FieldID(name:string; query:TSQLDataSet): integer; overload;
implementation
uses Unit1;
function FieldID(name:string; query:TSQLQuery): integer;
var
i : integer;
all_names : string;
begin
result := query.FieldList.IndexOf( name );
if result = -1 then
begin
result := 0;
ShowMessage( 'Ñòîëáåö íå íàéäåí ' + name + #13 + 'Âîçìîæíûå èìåíà: ' + #13 + query.FieldList.Text );
end;
end;
function FieldID(name:string; query:TSQLDataSet): integer;
var
i : integer;
all_names : string;
begin
result := query.FieldList.IndexOf( name );
if result = -1 then
begin
result := 0;
ShowMessage( 'Ñòîëáåö íå íàéäåí ' + name + #13 + 'Âîçìîæíûå èìåíà: ' + #13 + query.FieldList.Text );
end;
end;
end.