When I perform a SQL Query through MS Access I get results returned but if I perform the same query in VBScript my RecordCount is -1. I can't tell if this is a connection error. I'm not getting any but it's clear that the SQL does return results in Access. I'm getting 0 hits in the below connect code.
sqlquery = "SELECT * FROM i2cner WHERE Authors Like 'Ish*';"
dim conn
set conn=Server.CreateObject("ADODB.Connection")
conn.Provider="Microsoft.Jet.OLEDB.4.0"
conn.Open "d:/inetpub/ga/sarina/i2cner/contacts2000.mdb"
set r = Server.CreateObject("ADODB.recordset")
if r.state = 1 then r.close
r.Open sqlquery, conn
hits = r.RecordCount
session("hits") = hits
set session("r") = r