combobox : difference between setComboValue and selectOption

What is the difference between setComboValue and selectOption?

when I showing data loaded from db, say for editing a record I want an option selected in combobox based on value from DB, which method should I use - setComboValue or selectOption?

If you have any such example, please give link?

selectOption uses index of option as parameter
setComboValue uses value as parameter, also if there is no option with such value - new one will be created

Be sure to call both commands after data loading ( second parameter of load command can be used to catch such moment )

combo.loadXML(url, function(){ combo.selectOption(0); })