Probably needs casting...
if(dr.Read())
username = (String)dr["username"];
Type: Posts; User: theoobe
Probably needs casting...
if(dr.Read())
username = (String)dr["username"];
Use square brackets...
dr["username"]
Returning to my earlier point about disposing your database objects, it is bad practice to leave database connections lingering, which is what you are...
OleDbDataReader dr = cmd.ExecuteReader();
And
if (dr.Read())
The clue was in the exception.
Also don't forget to Dispose cmd, db and dr, or better yet, use 'using' statements.