Hi, I'm a PHP developer and i've been asked to do some development for a site which is on a web server which only supports ASP. I had planned to have a bash at writing an ASP program (first time) on this server which will interact with a MySQL database on another web server (my company's web space). Would this be possible?
First time using ASP to connect to remote MySQL database
Collapse
X
-
Hi Nicky,
ASP is definitely interoperable with MySQL - check out my website at www.cmdev-associates.com, uses MySQL 5 Community Edition with ASP and AJAX!
You need the ODBC connector from MySQL (version 3.51 is the latest, from http://dev.mysql.com/downloads/connector/odbc/3.51.html) and get it installed on the server where your ASP pages reside
You then need the following code:
[CODE=asp]
Set objDbConn = Server.CreateOb ject("ADODB.Con nection")
strConn = "Driver={My SQL 3.51 ODBC Driver};Server= yourmysqlserver address.com;Dat abase=yourDB;"
objDbConn.Curso rLocation = adUseClient
objDbConn.Open strConn
[/CODE]
Simple as that!
All the best,
medicineworker -
Here:
http://www.devarticles .com/c/a/MySQL/Two-Lessons-in-ASP-and-MySQL/
... is something to be taken into account with ASP/Vbscript and MySQL concerning date data type differences,
Regards,
Matti
Originally posted by nicky77Hi, I'm a PHP developer and i've been asked to do some development for a site which is on a web server which only supports ASP. I had planned to have a bash at writing an ASP program (first time) on this server which will interact with a MySQL database on another web server (my company's web space). Would this be possible?Comment
Comment