Yes, it should.
What exact error message do you get and in what line?
Set a breakpoint at the line SQL.Initialize(Dir, FileName, False) and look at the content of Dir and File.
Are these contents correct?
Execute the program step by step with this button
View attachment 65916 and watch what happens.
View attachment 65915