Upgrade from Bitcoin QT 0.8.5 to latest Bitcoin Core 0.15.X I bought and transacted BTC in 2013/2014.  I had a Bitcoin QT 0.8.5 wallet.  I plugged it in and it updated correctly to the latest block.  It correctly showed my BTC balance.  I made a transaction without enough fees, which has sat unconfirmed for weeks now.  I decided to upgrade to the latest Bitcoin Core wallet and so downloaded it, checked the Checksum, and then loaded it.  I swapped out the wallet file with my backup of my original wallet.  For some reason, it only shows about 1/1000th of my BTC holding.  I have got the blockchain completely up to date.  There are no other transactions showing, only those I have made.  I have gone back to QT 0.8.5 and it still shows the correct balance when the blockchain updates.  What am I doing wrong in the latest Core version?
Go to Bitcoin 0.8.5 Console Window and run : 

dumpprivkey "myaddress"


Then in bitcoin 0.15.1

 importprivkey "mykey"


if you don't need to unlock your wallet even if it's encrypted since you are using Bitcoin-qt not RPC commands and you've already set your password when you started it.

if you don't want to use bitcoin-qt. go to terminal and run on v.8.5.0:

unlock your wallet if encrypted

(space)bitcoin-cli walletpassphrase "passphrase" timeout


Get private key of any address:

(space)bitcoin-cli dumpprivkey "myaddress"


if your wallet is encrypted run:

(space)bitcoin-cli walletpassphrase "passphrase" timeout


Then go to the latest version and run:

 (space)bitcoin-cli importprivkey "mykey"


The space before the commands is important to the command will never be saved to logs.