WebApp can't access database table in one function.

I have a really bizarre problem with my Web App now; it’s in a new feature that I’ve implemented (not an existing one). Basically one function fails with the error message.

Do you know what normally causes this error message?

The code that calls this looks is below:

dim rs as recordSet = db.SQLSelect( "SELECT SKUID, serialNumber FROM orders WHERE customerEmail = '" + hashedEmail + "';" )

The bizarre thing is that the very same code works from a local application, which is accessing the very same database.

I’ve also tried:

dim rs as recordSet = db.SQLSelect( "SELECT * FROM orders WHERE customerEmail = '" + hashedEmail + "';" )

But I get the same error message, the tablename is correct, the column names are correct.

The local application will be running as a logged in user. Maybe the permissions for the database do not allow the web application to access it.

Perfect… I set this up 3 years ago and forgot all about that! Logged into the database server with the admin application and added select access to that table and bingo…