Note: this article is about software development jobs, but most of the points made apply to any kind of job out there.
Are you annoyed that, despite your many years in the company, you still didn't get a promotion? Or even a raise?
Even worse, the company is hiring people to cover upper level openings instead of promoting you?
Do you have a boss that is 5 or more years younger than you?
Or have you been interviewed by someone that is 5 or more years younger than you?
Are you afraid that you'll have a hard time finding another job, should something happen and "separate" you from the current one?
Think about it, and don't fool yourself... If most of the above applies to you, it's ALL YOUR FAULT!
So if you think about complaining that the company you work for doesn't appreciate your true value, or that there are no jobs because of the crisis, you ARE fooling yourself.
Still not convinced? Let me ask you this:
How many books did you read last year? And I'm not asking if you read the latest Harry Potter, I'm talking about programming books, software development books. Oh, and the "red Microsoft books for certification" don't count either. Most "Microsoft Certified Application Developers" I’ve seen couldn't figure out the syntax for a property.
What new technologies have you learned in the last year? (i.e. Can you really take advantage of .NET Framework 3.5 or are you still stuck in 2.0?)
Have you learned any methodologies or programming techniques? Agile and TDD have been trendy for some time now... do you REALLY know what they are about?
How much of what you learned this year can you really take with you to the next job? It's nice that you are now an expert in using Excel as a database because that's what your current job was about, but that won't help you much in getting a job working with MS SQL 2008.
Try this Programmer Competency Matrix. Find out where you’re lagging behind.
You can stop reading now if you (still) think your career is on a good path.

Still here? Good :)
So, what do you need to do? Increase your VALUE, of course.
You could see your VALUE as what the market is prepared to pay for your knowledge and skills.
Knowledge
General - languages, methodologies, patterns & practices, software architecture, etc.
The advantage of learning a new language, for example, is that you'll be able to use that knowledge for another job, in another company. You should try to direct yourself towards really valuable knowledge - learning Visual Basic 6 will probably help you less than learning Visual Basic .NET or C#.
Domain specific - accounting, vector graphics, banking, specialized programming languages, etc.
Getting this type of knowledge can imply a greater effort and will increase your value only when dealing with companies from that specific field. So think twice before spending 6 months learning about tombs and tombstone designs.
Skills
Ex: coaching, communication, team work, leadership.
Don't expect to be put in a management position to learn about leadership. You have to show yourself as the natural choice for the job before getting it - don't expect the company to just "give you a chance" and see how it turns out. Leadership does not equal official authority. Being able to work well with the team and help get the best out of your team mates will make you more valuable than being able to code alone like crazy for hours.
Now, your VALUE is what you sell when you go to an interview or when you ask for a pay raise. If it hasn't increased, you won't have any leverage in the negotiations.
The faster you raise you value, the better. Why? Because your time is limited!
There comes a point when your age starts to work against you. Are you 35 and you only have experience in VB6? Why should someone pay you more than a 23 years old with basic knowledge of C#? It's even worse: the 23 years old might have a thirst for learning new things, but you've certainly proved that you don't.
Basically, if you increase you value slowly, there could come a time when your pay will freeze, or start to decrease, or, even worse, you won't be able to find a job.
If you raise it fast, you can get to a point where you are in upper management or you have your own business - not so many worries for the years to come. And whatever happens, you'll have your value to "sell" to the highest bidder.
Is my value rising? How fast? Is my income rising? How fast?
Ask yourself these questions. Is your value stagnant? Work on it! Your value is up and your income didn't catch up? Get a raise, or get a better paying job!
You might be able to get a better income once or twice by using your negotiating skills, even though your value is not (yet) worth it. Don’t count on it though – in the long run, the sure way to do it is to raise your value.
So keep raising it, unless you want to end up with someone young enough to be your son to humiliate you in an interview!