Home > Archive > MS SQL Server ODBC > April 2005 > Successful connection with invalid UserId









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Successful connection with invalid UserId
Kaimal

2005-04-22, 7:23 am

Hi,
In my application , the connection to SQLServer is established
through a DSN name, UserId and Password(both UsrId and Password are
non empty) . The "SQLConnect" function is used for this purpose. The
problem is that the connection to the Database is success when I give
an empty UserId. But this problem is not there when the UserId is
invalid(non empty).In all the cases except for empty UserId , the
connection works as expectd.

Why is it connecting for empty UserId?

Is it because that default windows authentication is used for
connection when UserId is empty?

If so is there any way to avoid this (through a C/C++ program)?

pls help

Thanks
Kaimal
Sue Hoegemeier

2005-04-28, 8:23 pm

Yes...it's just using windows authentication.
Make sure you have a value for the user name when calling
SQLConnect. Don't call it without the value.

-Sue

On 22 Apr 2005 02:52:33 -0700, rbkaimal@hotmail.com (Kaimal)
wrote:

>Hi,
> In my application , the connection to SQLServer is established
>through a DSN name, UserId and Password(both UsrId and Password are
>non empty) . The "SQLConnect" function is used for this purpose. The
>problem is that the connection to the Database is success when I give
>an empty UserId. But this problem is not there when the UserId is
>invalid(non empty).In all the cases except for empty UserId , the
>connection works as expectd.
>
>Why is it connecting for empty UserId?
>
>Is it because that default windows authentication is used for
>connection when UserId is empty?
>
>If so is there any way to avoid this (through a C/C++ program)?
>
>pls help
>
>Thanks
>Kaimal


Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2009 droptable.com