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
MS Sql Server LazyDBA home page