The error happens because you use pruned mode, but want to load wallet.dat which never loaded previously or loaded after long time.
You can follow the Bitcoin Core suggestion (where you must download whole blockchain again) or simply extract the private key and load it to SPV wallet (such as Electrum).
But if you don't use pruned mode, please find debug.log (which located on folder where you store blockchain files & wallet.dat) and share it with us.
Thanks for that advice.
I don't know where the private key is at this stage. But I'm trying to avoid the process of hunting for it unless I can verify there is some coins in the wallet first. Is there a way I can extract the public key from the wallet?
It took nearly 4 days to download the blockchain, hoping to avoid that again.
1. Open bitcoin-qt
2. Open debug console, help->about->console
3. type in "dumpwallet <filename>"
4. if above command is invalid try with "dumpprivkey "
well you have a treasure there
Thanks a bunch for the info. So are you saying I have something? Is that because the debug.log mentions some coins at the end of it?
I've pointed the console to the original wallet.dat file (because it gets changed/enlarged in the default wallet location). So that is the original 80kb wallet file:
00:28:28

dumpwallet "C:\Users\PETER\AppData\Roaming\Bitcoin\wallets\pc dec 12 wallet\walletpc2.dat"
00:28:28

C:\Users\PETER\AppData\Roaming\Bitcoin\wallets\pc dec 12 wallet\walletpc2.dat already exists. If you are sure this is what you want, move it out of the way first (code -8)
00:29:34

dumpprivkey "C:\Users\PETER\AppData\Roaming\Bitcoin\wallets\pc dec 12 wallet\walletpc2.dat"
00:29:37

Invalid Bitcoin address (code -5)