Arthur Fuller
artful at rogers.com
Wed Jul 16 07:19:13 CDT 2003
What you're after is exactly how my app behaves, so I thought I should look
at its connection string. Here it is:
Provider=Microsoft.Access.OLEDB.10.0;Persist Security Info=False;Data
Source=rock;User ID='Enter your name and password';Initial
Catalog=ETS_Current;Data Provider=SQLOLEDB.1
TO achieve this I created a user called 'Enter your name and password'. Then
when I create the ADE file from the ADP, I log on as that user first. The
point is that SQL prompts for the password, since there is none provided in
the connection string.
Which admittedly looks a lot like what you're trying to do. One difference
is that I don't do it in code, but right from the Access File menu. Of
course, I'm not trying to pick up the user ID from the system. I make them
type it in.
Hth,
Arthur
-----Original Message-----
From: dba-sqlserver-bounces at databaseadvisors.com
[mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of David
Emerson
Sent: July 16, 2003 1:16 AM
To: dba-SQLServer at databaseadvisors.com
Subject: RE: [dba-SQLServer]Changing Connection string server
Further to my other message - I have found a property called Prompt which
is supposed to do what I want - but I can't get it to. I have tried -
sConnectionString = "PROVIDER=SQLOLEDB.1;PROMPT=1" & _
";PERSIST SECURITY INFO=FALSE;" & _
";INITIAL CATALOG=" & sDatabaseName & ";DATA SOURCE=" &
sServerName
and
sConnectionString =
"PROVIDER=SQLOLEDB.1;PROMPT=adpromptAlways;PASSWORD=" & sPWD & _
";PERSIST SECURITY INFO=FALSE;USER ID=" & sUID & _
";INITIAL CATALOG=" & sDatabaseName & ";DATA SOURCE=" &
sServerName
but neither work (nor variations). Any pointers?
Regards
David Emerson
DALYN Software Ltd
25b Cunliffe St, Johnsonville
Wellington, New Zealand
Ph/Fax (877) 456-1205
_______________________________________________
dba-SQLServer mailing list
dba-SQLServer at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-sqlserver
http://www.databaseadvisors.com