When you buy a brand new memory card, you need to Format it (your owner's manual explains how to do this, so check it). But, it may be hard to find in the manual.
If that's the case, then go to the 'Warning Displays', section near the back of the manual and find the error message about 'Card not initialized' and it will direct you to the correct page. But, to help you...the Format feature is in the SET-UP MENU.
You should also Format your card AFTER you have safely uploaded all images to your computer and you then want to delete all images from the card. Formatting regularly will prevent card errors. Just make sure you never touch the metal contacts on your xD card...
EDIT: DOUGLAS is quite correct in saying that your new 1GB M type xD card is not compatible with your camera. The main reason being, that your camera is an old model and it probably could only ever recognize a maximum capacity card of 512MB.
Please find the firmware update in the link below. If you can't follow the instructions (and they look quite complicated) then you will need to ask someone to do it for you...
Or you could return the card and not buy an M type or H type card...or better still, buy a newer model camera because the A340 is quite outdated.
DOUGLAS deserves a thumbs up from me, at the very least...lol
good luck...