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
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 Login Failed for user <null>. Help!

Author  Topic 

Muacqoo
Starting Member

3 Posts

Posted - 2005-04-18 : 22:00:37
I am currently using MSSQL 7 db configured using Mixed Mode authentication.

I have created a database named dbInfo with a few tables and records.

Under Security -> Logins I have the following users.
1 . sa - default
2 . BUILTIN\Administrators - default
3 . BUILTIN\Users granted with public and dbo_owner Database Access to the dbInfo database i have created.
4 . connectingUser granted with public and dbo_owner Database Access to the dbInfo database i have created.

Under ODBC Datasource DSN. I created one DSN named dbConn connection using sql authentication instead of windows authentication. And i connected using the connectingUser that i have created and default db set to dbInfo. It was tested successfully.

For my coding part. I am using VB. Database connection codes is as follows :

Private connADO as New ADODB.Connection

connADO.ConnectionString = "DSN=dbConn"
ConnADO.Open


The above code runs perfectly fine when i login to pc as administrator or any users under the window's Power Users group.
However, when i login as a normal user(under window's Users group). It give me an error, "Login failed for user <null> Reason : Not Trusted Connection".

At first, i thought that it was the ODBC registry key problem under \HKEY_LOCAL_MACHINE\SOFTWARE\ODBC.ini\dbConn problem, and i granted full control to windows Users. But still cannot.

Why? Can anyone help?

Thanks alot.

jen
Master Smack Fu Yak Hacker

4110 Posts

Posted - 2005-04-18 : 22:53:10
the error will only show if you're connection string is using windows authentication

since you're using sql authentication, this shouldn't be a problem

unless the dsn you created is userDSN and not systemDSN?

--------------------
keeping it simple...
Go to Top of Page

Muacqoo
Starting Member

3 Posts

Posted - 2005-04-18 : 23:19:31
i only use system DSN, not user DSN.
Go to Top of Page

jason
Posting Yak Master

164 Posts

Posted - 2005-04-19 : 17:09:45
What version of Windows?
Go to Top of Page

Muacqoo
Starting Member

3 Posts

Posted - 2005-04-19 : 22:40:31
I'm using Windows XP.

I have changed my SYSTEM DSN to use windows authentication already. Now no problem at all.

Go to Top of Page
   

- Advertisement -