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.
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 - default2 . BUILTIN\Administrators - default3 . 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.ConnectionconnADO.ConnectionString = "DSN=dbConn"ConnADO.OpenThe 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 authenticationsince you're using sql authentication, this shouldn't be a problemunless the dsn you created is userDSN and not systemDSN?--------------------keeping it simple... |
|
|
Muacqoo
Starting Member
3 Posts |
Posted - 2005-04-18 : 23:19:31
|
i only use system DSN, not user DSN. |
|
|
jason
Posting Yak Master
164 Posts |
Posted - 2005-04-19 : 17:09:45
|
What version of Windows? |
|
|
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. |
|
|
|
|
|