Bajal,
Did you assign the default db as db1 to the user1 during creation of the user? You can assign it even now. If that also is done. Then you can assign the grants in the database roles for db1: db_datareader, db_datawriter. Please let me know if this works. All this you can do from the Security option in the Enterprisemanager.
Regards
Neeraja
-----Original Message-----
From: Bajal Mohamed [mailto:[Email Address Removed] Monday, December 23, 2002 12:34 PM
To: LazyDBA.com Discussion
Subject: Password Authentication ...
Hi all,
we have a SQL 2K server named as "Server1". And our
users are able to connect with this server (and
databse named as db1) via Visual Basic Application
using windows authentication.
For this i used the following connection string (in
VB).
'--
Set cnn = New ADODB.Connection
cnn.ConnectionString = "driver={SQL Server};" & _ &
"server=server1;database=Db1"
cnn.ConnectionTimeout = 7
cnn.Open
'--
In the above code i did not specified any username and
password because the SQL Server automatically captures
"Who login into windows server" and used windows
security authentication.
This above code works fine.
But i want my users to be connected with this Db1 via
SQL Server authentication mode,"standard user" (not
thru windows authentication).
for this i tried with the following code (user name
"User1" and password "123" ;
'---
Set = New ADODB.Connection
cnn.ConnectionString = "driver={SQL Server};" & _
"server=server1l;uid ='user1';pwd='123';
database=db1"
cnn.ConnectionTimeout = 7
cnn.Open
'---
But i get the error as follows;
"[Microsoft][ODBC SQL Server Driver][SQL Server]Cannot
open database requested in login 'db1'. Login fails."
Could you please provide me some solution for this
problem.
Advanced thanks for your feeback.
=====
Best Regards,
Bajal Mohamed.
"BE COOL, ACT BOLD and LOOK SEXY".
__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com
---------------------------------------------------------------------
TO REPLY TO EVERBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY
To unsubscribe, e-mail: mssqldba-[Email Address Removed] additional commands, e-mail: mssqldba-[Email Address Removed]
Information contained in this E-MAIL being proprietary to Wipro Limited is 'privileged'
and 'confidential' and intended for use only by the individual or entity to which it is
addressed. You are notified that any use, copying or dissemination of the information
contained in the E-MAIL in any manner whatsoever is strictly prohibited.
****************************************************************************************
MS Sql Server LazyDBA home page