Using MySQL Connection in ASP

Use the code given below to establish a successful connection to MySQL via your ASP page.

<%
Set Conn = Server.CreateObject(”ADODB.Connection”)
Conn.Open “Driver={MySQL Odbc 3.51 Driver}; Server=localhost; uid=myLogin; pwd=myPass; database=myDB; option=3; port=3306;”
Set rsmyTable = Conn.Execute(”SELECT * From myTable”)
%>

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google
  • Live
  • YahooMyWeb
  • Yigg

If you enjoyed this post, please consider to leave a comment or subscribe to the feed and get future articles delivered to your feed reader.

Comments

No comments yet.

Leave a comment

(required)

(required)