The best way to be sure that your RAM is compatible is to buy a model that the RAM vendor advertises as compatible. For example, on Kingston's front page, enter “ASRock” as the manufacturer, then choose your exact motherboard model. (Exact model is important: sometimes a single letter or digit may indicate a completely different type of memory.) Unfortunately, they don't advertise any model as compatible. Neither do their competitor Crucial. That doesn't mean that they don't have suitable modules, just that they haven't tested this particular motherboard.
Looking at the P5B-DE specs, I'd expect the model you link to (2GB DDR2 PC2-6400 800MHz CL6) to work. I'd also expect the model you list (2048MB Kingston Value DDR2-400 CL3) to work (but slower than optimal), although it's not within the specs. Note that if you bought for DDR2-800 but got DDR2-400, you didn't get what you paid for and should request a refund or exchange.
Most motherboard vendors publish a list of tested RAM modules. Such lists are often incomplete (in particular, they tend not to be updated after the motherboard is put on the market, so they tend to lack choice for larger module capacities). For ASRock, it's the “Memory QVL” link right on the motherboard description page, and the list does include a few 2 GB models.
If you can't find a module that's advertised to work either by the RAM vendor or the motherboard vendor, it's usually enough to match the memory type (e.g. DDR2 or DDR3), the module capacity, the ECC/non-ECC attribute and the registered/buffered/unbuffered attribute.
Having a speed within range is mostly a matter of performance and cost (you want your RAM to be as fast as your motherboard supports, but faster is often more expensive) but is occasionally important for compatibility. Beyond that incompatibilities are rare unless you overclock or undervolt.