This topic is locked

Disable Acount

1/21/2009 8:26:36 PM
ASPRunnerPro General questions
E
enetsat author

I need disable some acount of users in the combo box

Who to make it ?

thankz

Sergey Kornilov admin 1/22/2009

You need to rephrase your question.

E
enetsat author 1/24/2009

I wanna , disable acount of user the data base use one combo box 'ENABLE' or 'DISABE'

if enable the user can login in the data base

if disable the user no have acess

thanks 4 all

J
Jane 1/27/2009

Hi,
add new field (active_field for example) to your table on the Datasource tables tab, then check this field in the Before login event on the Events tab.

Here is a sample:

str = "select active_field frim TableName where UserName='" & username & "' and Password='" & password & "'"

Set rstmp = server.CreateObject("ADODB.Recordset")

rstmp.open str,dbConnection

if rstmp("active_field")="ENABLE" then

BeforeLogin = True

else

BeforeLogin = False

end if

rstmp.close

set rstmp=nothing

E
enetsat author 1/30/2009

hello jane

this before login
str = "select ativo_field from usuarios where nome='" & nome & "' and senha='" & senha & "'"

Set rstmp = server.CreateObject("ADODB.Recordset")

rstmp.open str,dbConnection

if rstmp("ativo")="ENABLE" then

BeforeLogin = True

else

BeforeLogin = False

end if

rstmp.close

set rstmp=nothing
not function <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=37313&image=1&table=forumreplies' class='bbc_emoticon' alt=':o' />

i try here

thankx

J
Jane 2/3/2009

Hi,
username and password are ASPRunnerPro variables. Do not replace it with your code:

str = "select ativo from usuarios where nome='" &username & "' and senha='" & password & "'"

Set rstmp = server.CreateObject("ADODB.Recordset")

rstmp.open str,dbConnection

if rstmp("ativo")="ENABLE" then

BeforeLogin = True

else

BeforeLogin = False

end if

rstmp.close

set rstmp=nothing