I am trying to bind a dropdownlist to a query like in :
cmdString = "SELECT username from users where isnull(username)=false and closed=false order by username"
cmdSelect = New OleDbCommand(cmdString, dbCnDiary)
dbCnDiary.Open()
ddlusers.DataSource = cmdSelect.ExecuteNonQuery
ddlusers.datatextfield = "Username"
ddlusers.DataBind()
dbCnDiary.Close()
I get a nullexception error on the executenonquery - what could that mean ?
Thanks
cmdString = "SELECT username from users where isnull(username)=false and closed=false order by username"
cmdSelect = New OleDbCommand(cmdString, dbCnDiary)
dbCnDiary.Open()
ddlusers.DataSource = cmdSelect.ExecuteNonQuery
ddlusers.datatextfield = "Username"
ddlusers.DataBind()
dbCnDiary.Close()
I get a nullexception error on the executenonquery - what could that mean ?
Thanks