SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Addict jlisec01's Avatar
    Join Date
    Nov 2006
    Location
    MI
    Posts
    331
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    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.

  2. #2
    SitePoint Enthusiast WindowsHosting's Avatar
    Join Date
    Feb 2009
    Posts
    92
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hello,

    You could check here - http://aspnet101.com/aspnet101/tutorials.aspx?id=39

    Regards
    Find Free ASP.NET hosting information and resources at http://www.windowshostingasp.net.

  3. #3
    SitePoint Mentor NightStalker-DNS's Avatar
    Join Date
    Jul 2004
    Location
    Cape Town, South Africa
    Posts
    2,873
    Mentioned
    44 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.

  4. #4
    SitePoint Enthusiast
    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(); 
    2) use ODBC.NET.
    Tibet - information about the Tibet.
    Plan aTibet Travel Packages by train in July 2010!


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •