you need to modify the connection string in web.config
<connectionStrings>
<remove name="LocalSqlServer"/>
<add name="LocalSqlServer" connectionString="server=server ip;database=ASPNETDB;uid=youUsername;pwd=yourpassword"
providerName="System.Data.SqlClient"/>
</connectionStrings>
WOW! Thats it! Thanks a bunch. One more thing. I am also using the same database to display some data(have added some tables into it manually). What should I put in the connection string to make the connection to the database? Also, can I use a MySQL database instead? If yes, what will be the connection string?
Thanks for your help.
|||if you don't want to use the same name "LocalSqlServer", then you can add another connection with the same connectionString
like:
<add name="yourConnName" connectionString="server=server ip;database=ASPNETDB;uid=youUsername;pwd=yourpassword"
providerName="System.Data.SqlClient"/>
I am not sure if you can use MySQL as a configuration Database, but you can use it for application database.
Honestly, I didn't use it before. to get the exact connection string for MySQL, try to add a coonection from the wizard and see how vs2005 creates it in web.config
No comments:
Post a Comment