NM,
The error is due that your query doesn't return any rows (probably because the table is still empty) and the db_* proc you're using requires that at least one row is returned. It's a common error when you accidentally use db_1row instead of db_0or1row. Could you post the part of your code that bombs here?