unit Variable;
interface
var
F : TextFile;
ID_Test : Byte;
TAll, TAnsw : TDateTime;
AA : Variant;
S, SDB, SH, SV : String;
Slova:array[1..50] of string;
i, k, res, ID_Answer, result :integer;
a : Variant;
UserFIO, FIONew :String;
UserId, TestId, TestingId :Integer;
function GetUserId(UserFIO :String): Integer;
implementation
uses Unit2;
function GetUserId(UserFIO :String): Integer;
begin
with FStart.ADOQTest do
begin
SQL.Clear;
SQL.Add('SELECT ID FROM Respondents WHERE FIO="'+UserFIO+'"');
Active := TRUE;
Result := FieldByName('ID').AsInteger;
end;
end;
end.
interface
var
F : TextFile;
ID_Test : Byte;
TAll, TAnsw : TDateTime;
AA : Variant;
S, SDB, SH, SV : String;
Slova:array[1..50] of string;
i, k, res, ID_Answer, result :integer;
a : Variant;
UserFIO, FIONew :String;
UserId, TestId, TestingId :Integer;
function GetUserId(UserFIO :String): Integer;
implementation
uses Unit2;
function GetUserId(UserFIO :String): Integer;
begin
with FStart.ADOQTest do
begin
SQL.Clear;
SQL.Add('SELECT ID FROM Respondents WHERE FIO="'+UserFIO+'"');
Active := TRUE;
Result := FieldByName('ID').AsInteger;
end;
end;
end.