Home > Back-end >  Tip [Error] PSInserT. Pas (66) : Undeclared identifier: 'GetAllFileName'
Tip [Error] PSInserT. Pas (66) : Undeclared identifier: 'GetAllFileName'

Time:11-10

Procedure Tfrmpict. BitBtn2Click (Sender: TObject);
Var
Dirlist: TStringList;
I: Integer;
The begin
Inherited;
If chk_road. Checked then
The begin
Dirlist:=TStringList. Create;
Dirlist. The Clear;
Try
GetAllFileName (DirectoryListBox1 Directory, dirlist);
If dirlist. Count> 0 then
The begin
Gauge1. MinValue:=0;
Gauge1. MaxValue:=dirlist. Count - 1;
For I:=0 to dirlist. Do the Count - 1
The begin
With ADOQuery1 do
The begin
Insert;
Fields [0]. AsString:=copy (dirlist. The Strings, [I] 1, pos ('. ', dirlist. Strings [I]) - 1);
If imagesavetosql (ADOQuery1, dirlist Strings [I])=false then
The begin
ShowMessage (' import '+ dirlist Strings [I] +'. An error occurred when JPG images');
Abort.
end;
Post;
end;//with
Gauge1. AddProgress (1);
end;//for
End//if
The else
ShowMessage (' the directory does not exist JPG type images');

The finally
Dirlist. Free;
end;

End
The else
ShowMessage (' please choose operation execution path);

//Close;
end;

Tip: [Error] PSInserT. Pas (66) : Undeclared identifier: 'GetAllFileName, want how to deal with?

CodePudding user response:

This code, you mostly cloud copy, and you should not copy, copy one function GetAllFileName,

CodePudding user response:

Prompt output is said very understand, undefined GetAllFileName function, reference GetAllFileName corresponding unit can,
Seemingly IDE does not provide this function, so it should be a custom function, if it is a custom function, refer to the unit can function is located,
  • Related