Jump to content

Why I get an error but not an error?


Recommended Posts

Ok, code sample #1:


Officer = Session("MemberName")
Set MyMSGs = Server.CreateObject("ADODB.Recordset")
SQLQuery = "SELECT * FROM QuickChat WHERE Officer = "& Officer &" AND Read <> Yes"
Set MyMSGs = Conn.Execute(SQLQuery)
Error MSG:

error '80004005'

/va/main2.asp, line 13 *now I know this is a generic error, but...here is the bigger issue"
Sample #2:
DTS = Date()
Set GuildEvents = Server.CreateObject("ADODB.Recordset")
SQLQuery = "SELECT * FROM EVENTS WHERE EventDate >= '"& DTS &"' ORDER BY EventDate"
Set GuildEvents = Conn.Execute(SQLQuery)
No error on the page THIS query is run on.
Now, it is two different pages. The first one simly returns all messages stored for the person logging in.
The second lists events that have not expired.
Sample 1, errors out. Sample 2, works perfectly.
Both use the same cnnection string object along with the rest of the mockup site. So I know that isnt it. Tables are fine. SQL works within the SQL query wizards and scripts insid the database. I cant for the lif of me figure out why one page works, and another does not.
I really need help with this. I've googled everything, includee the useless search for th error code. Nothing about permissions or syntax works. So, I'm stumped.
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...