Print Page | Close Window

asp.net wih MYSQL

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Classic ASP Discussion
Forum Description: Discussion on Active Server Pages (Classic ASP).
URL: https://forums.webwiz.net/forum_posts.asp?TID=24245
Printed Date: 29 March 2026 at 10:25am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: asp.net wih MYSQL
Posted By: codeguru
Subject: asp.net wih MYSQL
Date Posted: 23 August 2007 at 6:55am
Please provide me with  the step by step explanation for connecting asp.net with MYSQL . Help required.

-------------
www.coderewind.com
Best Place to hunt for Code



Replies:
Posted By: rondre
Date Posted: 26 August 2007 at 10:46am
Might be different than this depending on who you're hosted with, but I just created a file that I include on all pages needing a db connection.  Here's the code I use:
 
<%
Dim dbconn, driverconn, db_server, db_name, db_username, db_userpassword
db_server = "hosted mysqlservername"
db_name = "YourDBName"
db_username = "YourDBUserName"
db_userpassword = "YourDBPassword"
driverconn = "Driver={MySQL ODBC 3.51 Driver};SERVER=" & db_server & ";DATABASE=" & db_name & ";UID=" & db_username & ";PWD=" & db_userpassword
%>
 
You will need to get the server information from your hosting company, and you'll have to check the version they're using - possibly change the ODBC driver version.  Also, emailing your hosting company is typically the best way to go when having connection problems.  Hope this helps somewhat!


Posted By: codeguru
Date Posted: 08 September 2007 at 11:57am
Thanks rondre for the help and support

-------------
www.coderewind.com
Best Place to hunt for Code



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net