Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problems Using Session (help)

Status
Not open for further replies.

scubaman

Programmer
Nov 10, 2000
6
BR
Hello,

I'm using the code to check if the user was subscribe into DB... so
he redirect if correct... if no.... go to other page...

My problem is... how routine I need put into the file...
conteudo.asp... to check if the session it's true if not.... redirect to file acessar.asp

Please help me...

'SELECT QUE BUSCA NO BANCO O NOME E A SENHA DO USUARIO
sqltemp="select * from acesso where usu = '" & nome & "'" & "and pass = '"&senha& "'"
set busca=session("banco").execute(sqltemp)

'check if found
if busca.eof then
set busca = Nothing
response.redirect "Ace_neg.htm"
else
session("nivel") = busca("nivel")
set busca = Nothing
response.redirect "conteudo.asp"
end if %>

Thanks
Luciano
 
Hey,

Without any more information are you sure that this line is correct

set busca=session("banco").execute(sqltemp)

I would have had something like
set busca=objConn.execute(sqltemp)

where objConn is the ADODB.Connection object
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top