Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Other Forums
 MS Access
 Cant access MSAccess DB querie result that uses

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2001-10-23 : 09:27:02
José Vieira writes "Hi,
Im trying to get results from a querie that works fine if I dont use the IN and NOT IN declarations,...
its strange I updated for the most recent MDAC and it still returns nothing in the ASP page, if I run the exactly same querie inside MSAccess everything works fine, If I run in ASP page it returns nothing.

the code Im using is
SELECT T_CDS.ID_CD, T_CDS.TITULO_CD, T_CDS.ID_ARTISTA, T_CDS.ID_CATEGORIA, T_CDS.EDITORA_CD, T_CDS.ANO_CD, T_ARTISTA.ID_ARTISTA, T_ARTISTA.NOME_ART, T_CATEGORIA.ID_CATEGORIA, T_CATEGORIA.NOME_CAT
FROM T_CDS, T_ARTISTA, T_CATEGORIA
WHERE T_CDS.ID_ARTISTA = T_ARTISTA.ID_ARTISTA AND T_CDS.ID_CATEGORIA = T_CATEGORIA.ID_CATEGORIA AND T_CDS.ID_ARTISTA IN (SELECT ID_ARTISTA FROM T_ARTISTA WHERE NOME_ART like '*gun*')

as it is in th ASP page i get nothing, but if i take off
AND T_CDS.ID_ARTISTA IN (SELECT ID_ARTISTA FROM T_ARTISTA WHERE NOME_ART like '*gun*')
it returns all the records ok

the asp code Im using is:
con_db = "DRIVER={Microsoft Access Driver (*.mdb)};"
con_db = con_db & "DBQ=" & Server.MapPath("./cds.mdb") & ";"
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open SQLStmt, con_db, 2, 1

ive tried also with Jet DSNLess way, and it also doesnt work with it, I installed SP1 of MDAC 2.6, and nothing also,... its really weird to return the records in MSAccess and not in ASP.

thanx,
JV

I really tried to find this in your website,.,. but I couldnt,,. I hope i havent missed"
   

- Advertisement -