I try to restore the database like this:
SQL = @\"RESTORE DATABASE MyDataBase TO DISK=\'d:\\MyDATA.BAK\'\"; Cmd = new SqlCommand(SQL, Conn);
You must connect to the database server via a different database.
So your connection string should take you to say "Master" or another database on the server, then you can complete the task at hand.