![]() |
| ||
| How to remove uid and password in connection string? Hi, When I use sql server native client for odbc sql connection then it is asking uid and password, once I supply uid and pwd in odbc connection , I think there should not be necessary to give uid and password in C# in sql connection string. I want once we supply the dsn value to odbc sql connection string then it should not ask for uid and password which is already given in dsn creation. How can I resolve it ? |
| ||
| Re: How to remove uid and password in connection string? Quote:
Declare the connection string in web.config. like below, <configuration> <appsettings> <add key="Connectionstring" value="data source=ServerName;initial catalog=dbname;uid=username of sql server;pwd=password of the sql server"> </add> </appsettings> </configuration> or declare the connection string in form level public sqlconnection con=new sqlconnection (="data source=ServerName;initial catalog=dbname;uid=username of sql server;pwd=password of the sql server"); Thanks |
| All times are GMT -4. The time now is 6:01 pm. |
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC