G
g622
Unregistered / Unconfirmed
GUEST, unregistred user!
查询的SQL如下
SELECT [saleID] AS UID, count(*) AS uqcount
FROM LogTable
WHERE (queryID in (select ID from querytable where comm = 0)) and ((saleID in (select storeID from storetable where saleID in (select storeID from storetable where saleID = 4))) or (saleID in (select storeID from storetable where saleID =4)) )
GROUP BY [saleID]
HAVING count(*)>0;
在ms access中建立查询可以返回记录,但是在asp中进行查询,返回结果总为空.
我在asp中连接数据库的方式如下
gConn.open "DBQ="
+ server.mappath("storelog.mdb" + ";DefaultDir=;DRIVER={Microsoft Access Driver (*.mdb)};"
呵呵,真是奇怪
SELECT [saleID] AS UID, count(*) AS uqcount
FROM LogTable
WHERE (queryID in (select ID from querytable where comm = 0)) and ((saleID in (select storeID from storetable where saleID in (select storeID from storetable where saleID = 4))) or (saleID in (select storeID from storetable where saleID =4)) )
GROUP BY [saleID]
HAVING count(*)>0;
在ms access中建立查询可以返回记录,但是在asp中进行查询,返回结果总为空.
我在asp中连接数据库的方式如下
gConn.open "DBQ="
+ server.mappath("storelog.mdb" + ";DefaultDir=;DRIVER={Microsoft Access Driver (*.mdb)};"
呵呵,真是奇怪