When running the following command

stsadm -o addsolution -filename c:\delphi\name.wsp

it errors and returns

Object reference not set to an instance of an object.
c:\delphi\name.wsp: The Solution installation failed.


This is because the windows account you're logged into the server with does not have permission to the SQL server. stsadm uses the logged in user's permissions to process everything, not the application pool identity central admin runs on.

I hope this helps!