How to check user id and password via ADO with SQL Server 2000? 
Author Message
 How to check user id and password via ADO with SQL Server 2000?

I writting an application by using VB6+ADO to access SQL Server.

All the users have their own user_id and password while running the app.

I can search the system table to see if the the user_id exists,
but  how can I check the password without error msg occured?

Thanks

Michael



Fri, 06 May 2005 08:57:35 GMT  
 How to check user id and password via ADO with SQL Server 2000?
Michael,

If you could get so easy access to password, then what would be the reason
for security? No, you cannot read password, same is it Windows. You could
get user id, but not password

--
Val Mazur
Microsoft MVP


Quote:
> I writting an application by using VB6+ADO to access SQL Server.

> All the users have their own user_id and password while running the app.

> I can search the system table to see if the the user_id exists,
> but  how can I check the password without error msg occured?

> Thanks

> Michael



Fri, 06 May 2005 09:44:14 GMT  
 How to check user id and password via ADO with SQL Server 2000?
Thnks for the reply, but I think you mistaked me idea.

Current i am trying to write some ASP file using vb script and ADO object.

What I mean is  how to write a procedure to check the user's id and password
by using ADO with SQL server?  so that the program can go to next procedure,
If there the user_id or password is not correct, the APS pages need to
handle the error msg and aske the user to check and key in again. right now
my ASP pages alway show me something like  "error connection ..."  if the
user send a wrong user_id or password.

Thanks

Michael


Quote:
> Michael,

> If you could get so easy access to password, then what would be the reason
> for security? No, you cannot read password, same is it Windows. You could
> get user id, but not password

> --
> Val Mazur
> Microsoft MVP



> > I writting an application by using VB6+ADO to access SQL Server.

> > All the users have their own user_id and password while running the app.

> > I can search the system table to see if the the user_id exists,
> > but  how can I check the password without error msg occured?

> > Thanks

> > Michael



Fri, 06 May 2005 15:49:12 GMT  
 How to check user id and password via ADO with SQL Server 2000?
Michael,

Since there is no way to read password, there is no direct way to check it.
I think using error handling is easiest way to do that

--
Val Mazur
Microsoft MVP


Quote:
> Thnks for the reply, but I think you mistaked me idea.

> Current i am trying to write some ASP file using vb script and ADO object.

> What I mean is  how to write a procedure to check the user's id and
password
> by using ADO with SQL server?  so that the program can go to next
procedure,
> If there the user_id or password is not correct, the APS pages need to
> handle the error msg and aske the user to check and key in again. right
now
> my ASP pages alway show me something like  "error connection ..."  if the
> user send a wrong user_id or password.

> Thanks

> Michael



> > Michael,

> > If you could get so easy access to password, then what would be the
reason
> > for security? No, you cannot read password, same is it Windows. You
could
> > get user id, but not password

> > --
> > Val Mazur
> > Microsoft MVP



> > > I writting an application by using VB6+ADO to access SQL Server.

> > > All the users have their own user_id and password while running the
app.

> > > I can search the system table to see if the the user_id exists,
> > > but  how can I check the password without error msg occured?

> > > Thanks

> > > Michael



Fri, 06 May 2005 20:31:13 GMT  
 How to check user id and password via ADO with SQL Server 2000?
Michael,

Are you trying to have the user supply their log in name and password so
that the app can connect to SQL Server?


Quote:
> Thnks for the reply, but I think you mistaked me idea.

> Current i am trying to write some ASP file using vb script and ADO object.

> What I mean is  how to write a procedure to check the user's id and
password
> by using ADO with SQL server?  so that the program can go to next
procedure,
> If there the user_id or password is not correct, the APS pages need to
> handle the error msg and aske the user to check and key in again. right
now
> my ASP pages alway show me something like  "error connection ..."  if the
> user send a wrong user_id or password.

> Thanks

> Michael



> > Michael,

> > If you could get so easy access to password, then what would be the
reason
> > for security? No, you cannot read password, same is it Windows. You
could
> > get user id, but not password

> > --
> > Val Mazur
> > Microsoft MVP



> > > I writting an application by using VB6+ADO to access SQL Server.

> > > All the users have their own user_id and password while running the
app.

> > > I can search the system table to see if the the user_id exists,
> > > but  how can I check the password without error msg occured?

> > > Thanks

> > > Michael



Sat, 07 May 2005 10:22:01 GMT  
 How to check user id and password via ADO with SQL Server 2000?
Right !! That is what I want.
Any good idea?

Many thanks

Michael



Quote:
> Michael,

> Are you trying to have the user supply their log in name and password so
> that the app can connect to SQL Server?



> > Thnks for the reply, but I think you mistaked me idea.

> > Current i am trying to write some ASP file using vb script and ADO
object.

> > What I mean is  how to write a procedure to check the user's id and
> password
> > by using ADO with SQL server?  so that the program can go to next
> procedure,
> > If there the user_id or password is not correct, the APS pages need to
> > handle the error msg and aske the user to check and key in again. right
> now
> > my ASP pages alway show me something like  "error connection ..."  if
the
> > user send a wrong user_id or password.

> > Thanks

> > Michael



> > > Michael,

> > > If you could get so easy access to password, then what would be the
> reason
> > > for security? No, you cannot read password, same is it Windows. You
> could
> > > get user id, but not password

> > > --
> > > Val Mazur
> > > Microsoft MVP



> > > > I writting an application by using VB6+ADO to access SQL Server.

> > > > All the users have their own user_id and password while running the
> app.

> > > > I can search the system table to see if the the user_id exists,
> > > > but  how can I check the password without error msg occured?

> > > > Thanks

> > > > Michael



Sat, 07 May 2005 12:08:06 GMT  
 How to check user id and password via ADO with SQL Server 2000?

Quote:

> Right !! That is what I want.
> Any good idea?

Here is one I use ( I got this from some code that you use to change
your password - which I don't do here):
*****************************************************************************************
create procedure validUser


as

set nocount    on
set ansi_nulls on

declare




-- Determine name & suid of login whose pw to check


    begin

    end
else
    begin

    end


       from   master..syslogins l


    begin
        select 1
        return (1)
    end


Not be checked.


       from   master..syslogins l



             )


    begin
        select 2
        return(2)
    end

select 0
GO

*****************************************************************************

Tom

Quote:
> Many thanks

> Michael



>>Michael,

>>Are you trying to have the user supply their log in name and password so
>>that the app can connect to SQL Server?



>>>Thnks for the reply, but I think you mistaked me idea.

>>>Current i am trying to write some ASP file using vb script and ADO

> object.

>>>What I mean is  how to write a procedure to check the user's id and

>>password

>>>by using ADO with SQL server?  so that the program can go to next

>>procedure,

>>>If there the user_id or password is not correct, the APS pages need to
>>>handle the error msg and aske the user to check and key in again. right

>>now

>>>my ASP pages alway show me something like  "error connection ..."  if

> the

>>>user send a wrong user_id or password.

>>>Thanks

>>>Michael



>>>>Michael,

>>>>If you could get so easy access to password, then what would be the

>>reason

>>>>for security? No, you cannot read password, same is it Windows. You

>>could

>>>>get user id, but not password

>>>>--
>>>>Val Mazur
>>>>Microsoft MVP



>>>>>I writting an application by using VB6+ADO to access SQL Server.

>>>>>All the users have their own user_id and password while running the

>>app.

>>>>>I can search the system table to see if the the user_id exists,
>>>>>but  how can I check the password without error msg occured?

>>>>>Thanks

>>>>>Michael



Sat, 07 May 2005 13:12:19 GMT  
 How to check user id and password via ADO with SQL Server 2000?

Thanks.

Have a nice day

Michael


Quote:

> > Right !! That is what I want.
> > Any good idea?

> Here is one I use ( I got this from some code that you use to change
> your password - which I don't do here):

****************************************************************************
*************
Quote:
> create procedure validUser


> as

> set nocount    on
> set ansi_nulls on

> declare




> -- Determine name & suid of login whose pw to check


>     begin

>     end
> else
>     begin

>     end


>        from   master..syslogins l


>     begin
>    select 1
> return (1)
>     end


> Not be checked.


>        from   master..syslogins l


')

>              )


>     begin
> select 2
> return(2)
>     end

> select 0
> GO

****************************************************************************
*

- Show quoted text -

Quote:

> Tom

> > Many thanks

> > Michael



> >>Michael,

> >>Are you trying to have the user supply their log in name and password so
> >>that the app can connect to SQL Server?



> >>>Thnks for the reply, but I think you mistaked me idea.

> >>>Current i am trying to write some ASP file using vb script and ADO

> > object.

> >>>What I mean is  how to write a procedure to check the user's id and

> >>password

> >>>by using ADO with SQL server?  so that the program can go to next

> >>procedure,

> >>>If there the user_id or password is not correct, the APS pages need to
> >>>handle the error msg and aske the user to check and key in again. right

> >>now

> >>>my ASP pages alway show me something like  "error connection ..."  if

> > the

> >>>user send a wrong user_id or password.

> >>>Thanks

> >>>Michael



> >>>>Michael,

> >>>>If you could get so easy access to password, then what would be the

> >>reason

> >>>>for security? No, you cannot read password, same is it Windows. You

> >>could

> >>>>get user id, but not password

> >>>>--
> >>>>Val Mazur
> >>>>Microsoft MVP



> >>>>>I writting an application by using VB6+ADO to access SQL Server.

> >>>>>All the users have their own user_id and password while running the

> >>app.

> >>>>>I can search the system table to see if the the user_id exists,
> >>>>>but  how can I check the password without error msg occured?

> >>>>>Thanks

> >>>>>Michael



Sat, 07 May 2005 17:33:21 GMT  
 
 [ 8 post ] 

 Relevant Pages 

1. Executing MS SQL Server 2000 stored procs via MS Access 2000

2. VB Sql Server Via ADO Problem: [Microsoft][ODBC Sql Server Driver]

3. User ID / Password Checking

4. VB6: Oracle 8/SQL Server 2000 compatibility problems using ADO 2.5 and SQL

5. VB6: Oracle 8/SQL Server 2000 compatibility problems using ADO 2.5 and SQL Syntax

6. VB6: Oracle 8/SQL Server 2000 compatibility problems using ADO 2.5 and SQL Syntax

7. User Id and Passwords from NT4 Server?

8. User Id and Passwords from NT4 Server?

9. User Id and Passwords from NT4 Server?

10. SQL Server 2000: Create column descriptions via code

11. VB.Net Client Checking for the existence of data on a SQL Server 2000

12. ..check presence of SQL Server 7.0 / 2000

 

 
Powered by phpBB® Forum Software