Hey guys, Normaly I use or code in PHP and use mySQL. So I'm very new to ASP. But I need to access a mySQL database using ASP. I've searched the web and tested many different methods with no success. The code below is what I'm trying to use: <% strConnection = "Driver={MySQL ODBC 3.51 Driver};Server=mysql-03.xcalibre.co.uk;Port=3306;Option=131072;Stmt=;Database=mission;Uid=XXXX;Pwd=XXXX" Set adoConn = Server.CreateObject("ADODB.Connection") adoConn.Open strConnection strQuery = "SELECT * FROM venues;" Set RecordSet = adoConn.Execute(strQuery) %> Code (markup): When running the code I get the following error: Microsoft OLE DB Provider for ODBC Drivers error '80004005' [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified /information/connection.asp, line 17 I've tried just using Driver={MySQL} but I still get the same error. Can any one help with this please? Thanks for your help.
"DRIVER={MySQL ODBC 3.51 Driver};SERVER=999.0.0.1;DATABASE=zzzz;USER=yyyy;PASSWORD=xxxx;OPTION=3;" works for me. Or you could try mysqlhelper which makes life a bit easier
I have a website at my sign emlak (generally all of my sites created with asp mysql) set strconn = server.createobject("adodb.connection") strconn.open = "driver={mysql odbc 3.51 driver}; server=your ip or localhost; UID=username; pwd=password; db=databasename" your ip or localhost : if your hosting provider is support remote ip connection then server = your ip if your hosting provider is not support remote ip connection then server = localhost set strconn = server.createobject("adodb.connection") strconn.open = "driver={mysql odbc 3.51 driver}; server=[B]your ip or localhost[/B]; UID=[B]username[/B]; pwd=[B]password[/B]; db=[B]databasename[/B]" sql="select * from your_table_name" set sql_query =strconn.execute(sql) if not sql_query.eof then while not sql_query .eof resonse.write sql_query("filed_name") sql_query .movenext wend end if Code (markup): Asp and mysql is very fast . I recommend for you , for your all projects. on your local computer: mysql and its driver must be installed.
yes, you must firstly install mysql odbc driver. you can find it mysql web site (or a simple search in google as mysql odbc driver download)
Hi, I use mysql in one of my asp.net site and it's really easy, in the article below, I share my whole experience about (configuring, examples, using MySql in SqlDataSource/GridView): using mysql in asp.net I hope it'll be useful
I never did the mysql connection from asp. However, in asp.net, I have used it several times. It is very easy and straight forward in .NET. You can use the managed component (ADO.NET driver for .NET) named MYSQL.DATA.DLL which is developed by mysql itself. You can find the sample code for retrieving data and exexuting operations on mysql database using any .net language here. http://ask4asp.net/post/using-mysql...anding-database-operations-mysql-asp_net.aspx