Selecting a directory with TOpenDialog

You can use the TFileOpenDialog (on Vista+): with TFileOpenDialog.Create(nil) do try Options := [fdoPickFolders]; if Execute then ShowMessage(FileName); finally Free; end; Personally, I always use the TFileOpenDialog on Vista+ and fallback using the SelectDirectory (the good one!) on XP, like this: if Win32MajorVersion >= 6 then with TFileOpenDialog.Create(nil) do try Title := ‘Select Directory’; Options … Read more

Is the compiler treatment of implicit interface variables documented?

If there is any documentation of this behavior, it will probably be in the area of compiler production of temporary variables to hold intermediate results when passing function results as parameters. Consider this code: procedure UseInterface(foo: IInterface); begin end; procedure Test() begin UseInterface(Create()); end; The compiler has to create an implicit temp variable to hold … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)