Well you're talking about a totally different error now. It sounds like a db error. I can't see the query code from here ;) But with datasources it could be anything from missing permissions, wrong user account used to connect, to a datasource pointing to the wrong db.