Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Contributor
3024 Points
461 Posts
Sep 25, 2007 08:54 AM|LINK
Hey, you should specify the userid and password in your connection string you can use one of the following:
connectionString="server=localhost;uid=sa;pwd=yourpasswordhere;database= yourdatabasenamehere";
OR use this in your web.config:
<connectionStrings> <add name="DatabaseConnectionString" connectionString="Data Source=YourServerName;Initial Catalog=YourDatabaseName.MDF;User ID=sa;Password=YourPassword" providerName="System.Data.SqlClient"/> </connectionStrings> or if you are trying to put the paramerts dynamically from some controls use the following: string connectionString = "server= " + VarServerName + "; uid=sa;pwd=" + varPassword + "; database= " + VarDatabase; hope this help thanks
<connectionStrings>
<add name="DatabaseConnectionString" connectionString="Data Source=YourServerName;Initial Catalog=YourDatabaseName.MDF;User ID=sa;Password=YourPassword" providerName="System.Data.SqlClient"/>
</connectionStrings>
or if you are trying to put the paramerts dynamically from some controls use the following:
string connectionString = "server= " + VarServerName + "; uid=sa;pwd=" + varPassword + "; database= " + VarDatabase;
hope this help
thanks
hkhaled
Contributor
3024 Points
461 Posts
Re: need help in publishing
Sep 25, 2007 08:54 AM|LINK
Hey, you should specify the userid and password in your connection string you can use one of the following:
connectionString="server=localhost;uid=sa;pwd=yourpasswordhere;database= yourdatabasenamehere";