以下作品在 Access 中;
SELECT Transactions.Date, Transactions.Time, Transactions.Direction,
Transactions.TransactionNumber, Transactions.TransactionType,
Transactions.Exception, Exceptions.ExceptionType
FROM Transactions LEFT JOIN Exceptions
ON (Transactions.TransactionNumber = Exceptions.TransactionNumber)
AND (Transactions.Date = Exceptions.Date)
AND (Transactions.TokenNumber = Exceptions.TokenNumber)
WHERE (((Transactions.Date)>=20120803)
AND ((Transactions.Direction)=-1)
AND ((Exceptions.ExceptionType) Not In (43,44,45,46)
OR (Exceptions.ExceptionType) Is Null)
AND ((Transactions.TokenNumber)=6605253))
ORDER BY Transactions.Date, Transactions.TransactionNumber;
但是当在 ASP 中完成如下操作时,我得到错误 '80004005'
SELECT Transactions.Date, Transactions.Time, Transactions.Direction,
Transactions.TransactionNumber, Transactions.TransactionType,
Transactions.Exception, Exceptions.ExceptionType
FROM Transactions LEFT JOIN Exceptions
ON Transactions.TransactionNumber = Exceptions.TransactionNumber
AND Transactions.Date = Exceptions.Date
AND Transactions.TokenNumber = Exceptions.TokenNumber
WHERE Transactions.Direction = -1
AND (Exceptions.ExceptionType Not In (43,44,45,46)
OR Exceptions.ExceptionType Is Null)
AND Transactions.TokenNumber= 6605253
AND Transactions.Date >= 20120803
ORDER BY Transactions.Date, Transactions.TransactionNumber
我顺便删除了一些括号,认为它会有所帮助,但它没有。