i am starting a new website that is developed in asp.net using C#.
The hosting provider uses MySQL as the database. when i upload my files on their server how will i connect to the database of the hosting server for my applications like user login, user creation.
I am asking this because i think that i can only use the database provided by the hosting server for storing the user data like user details, login details etc.
Usually, you can see all db-information at the hosting panel of your host account or it has been emailed to you when the account was created. If you can't find it, contact support regarding this.
If you already have all login details, change your connection strings as per example.
For a quality .net hosting there always comes with mssql server database support for better management. If your hosting doesn't support mssql, I highly doubt the service quality.
ArpitMaheshw...
Member
18 Points
23 Posts
how to use database
Dec 09, 2011 07:04 AM|LINK
Hi
i am starting a new website that is developed in asp.net using C#.
The hosting provider uses MySQL as the database. when i upload my files on their server how will i connect to the database of the hosting server for my applications like user login, user creation.
I am asking this because i think that i can only use the database provided by the hosting server for storing the user data like user details, login details etc.
correct me if I am wrong
Any help would be great.
thanks in advance
amit.jain
Star
11225 Points
1815 Posts
Re: how to use database
Dec 09, 2011 07:19 AM|LINK
Refer these links to know how to conect to mysql in asp.net
http://www.sqlstrings.com/mysql-asp.net-connection.htm
http://www.codeproject.com/KB/database/mysqlinaspnet.aspx
http://christianasp.net/usingmysql50withaspnet-part1.aspx
amiT jaiN
ASP.NET C# VB Articles And Code Examples
Chetan Chopa...
Participant
1980 Points
347 Posts
Re: how to use database
Dec 09, 2011 07:21 AM|LINK
No,
You can use any other database provided by any other hosting server for storing the user data.
What you need is the database server name or if it is on same machine then try using localhost
also you need to create user along with database to access the same.
smirnov
All-Star
23700 Points
4056 Posts
Re: how to use database
Dec 09, 2011 07:25 AM|LINK
Usually, you can see all db-information at the hosting panel of your host account or it has been emailed to you when the account was created. If you can't find it, contact support regarding this.
If you already have all login details, change your connection strings as per example.
In the code
<asp:SqlDataSource id="DataSource1" SelectCommand="SELECT * FROM table1" ConnectionString="DRIVER={MySQL ODBC 3.51 Driver}; SERVER=myhost; PORT=3306; DATABASE=mydb; USER=myuser; PASSWORD='mypassword'; OPTION=0; " runat="server" ProviderName="System.Data.Odbc"/>In the web.config
Topspy
Contributor
3785 Points
806 Posts
Re: how to use database
Dec 10, 2011 06:44 AM|LINK
For a quality .net hosting there always comes with mssql server database support for better management. If your hosting doesn't support mssql, I highly doubt the service quality.
Asp.net Hosting | Windows Hosting | SQL Server Hosting