I read the 10 min solution on "Dynamically Load Components From Packages at Run-Time". however, I can't get my program work in delphi. I got the access violation error. Anyone can help me?

var
ADOConnection1 :TADOConnection;
aClass := FindClass('TdmDataModule');
if aclass <> nil
begin
ADOConnection1 := TADOConnection(TComponentClass(aclass).Create(Self));

ADOConnection1.Close; //it never pass thru this line!!!!

end;