Classic ASP bizarre SQL error

Blizzard

New Member
I am connecting to a Access DB, with following Conn String\[code\]Conn.Open "PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA SOURCE=\\server\share\Data\PFWTRAN.MDB"\[/code\]The following SQL works fine;\[code\]SQLIn = "SELECT Date, Time " & _ "FROM Transactions " & _ "WHERE TokenNumber = " & TokenNo & " " & _ "AND Date >= " & FromDateG & " " & _ "AND Direction = -1 " & _ "ORDER BY Date, TransactionNumber;"\[/code\]However, I want rows where Transaction.Exception = 0, yet when I add this AND condition, the script fails when the RS is opened;\[code\]error '80004005' /path/.../.../...asp, line 97\[/code\]If I remove the AND condition, it works again.Even If I try and put 'Exception' in the SELECT section, it won't run and gives me that error.Why would the inclusion of one field cause such an error? I read the error is due to permissions, but my permissions are fine as the SQL works without this one field in it.Any clues?It is a very old Access 95 database (or even earlier), perhaps I need to change connection provided?
 
Back
Top