SitePoint Sponsor |
|
User Tag List
Results 1 to 4 of 4
-
May 6, 2009, 00:23 #1
how do you connect to mysql database
Hey guys, just curious if anyone knows a good reference site, talks about how to connect to a mysql database, also if I do connect to a mysql database after switching over to access, would just the connection be different? thanks.
-
May 6, 2009, 00:40 #2
Hello,
You could check here - http://aspnet101.com/aspnet101/tutorials.aspx?id=39
RegardsFind Free ASP.NET hosting information and resources at http://www.windowshostingasp.net.
-
May 6, 2009, 00:48 #3
- Join Date
- Jul 2004
- Location
- Cape Town, South Africa
- Posts
- 2,880
- Mentioned
- 48 Post(s)
- Tagged
- 0 Thread(s)
Google can be your friend here.
No, not just the connection will change. They query syntax with also differ slightly depending on the usage.
-
May 11, 2009, 01:26 #4
- Join Date
- Apr 2009
- Posts
- 27
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
There are 2 methods to realize ASP.NET connect to Mysql Database.
1) use mysql support default "provider(http://www.mysql.com/products/connector/net/)".
HTML Code:using MySql.Data.MySqlClient; ........ MySqlConnection myConnection=new MySqlConnection("server=localhost;user id=root;password=XXXX;database=baby"); string sql="select * from admin"; MySqlDataAdapter myda=new MySqlDataAdapter(sql,myConnection); DataSet mydataset=new DataSet(); myda.Fill(mydataset,"admin"); mydatagrid.DataSource=mydataset; mydatagrid.DataBind();
Bookmarks