unique connection string problem

Microsoft Visual Studio .NET

jamestk76yahoocom
I have written a generalised database access component which construct
the connection string after decrypting its value using DPAPI
methodology.

But as i assign the enitre connection string to <sql connection
object>.conectionstring property, i get an error always specifing -
"Format of the initialization string does not conform to specification
starting at index _ "
My string is something like
"Server=SQLSERVER;Database=Northwind;UID=user;PWD=password;Trusted_Connection=False"
The index number always point beginning of "PWD" in above case i get
error like -- "Format of the initialization string does not conform to
specification starting at index 45"

However if I hardcode the same string i don't get an error. 
Please let me know y this above error popsup evethough i have tried
using stringbuilder also.

any help is welcomed.
james
                                            
JoshMoodyonlinemicrosoftcom
According to MSDN, you are supposed to use "User ID" and not "UID". Perhaps 
that is what is causing your problem? 

HTH

Josh Moody
VSU Team

-- 

This posting is provided "AS IS" with no warranties, and confers no rights. 
Use of included script samples are subject to the terms specified at 
http://www.microsoft.com/info/cpyright.htm 

Note:  For the benefit of the community-at-large, all responses to this 
message are best directed to the newsgroup/thread from which they 
originated.
                                            
Greg
Hi James/Josh,

The other thing I've found is the provider doesn't like having both (User ID
and Password) along with (Trusted_Connection) arguments in the same string,
whether the second one is true or false. Just use "User ID" and "Password"
or use "Trusted_Connection=true".

HTH,