CONNECTING MYSQL DATABASE THROUGH ASP
We can use DSN-less method to connect to MYSQL Database by using connection string through ASP script. But to use the connection string, MYSQL ODBC drivers need to be installed at the host machine. The required drivers have been installed on grad.uta.edu so, we can access the mySql database without any problem. Once that is done, the following section describes how we can use conventional connection string method to access MYSQL database via Active X Data Objects (ADO).
Using a connection string (DSN-Less) (http://www.devarticles.com/art/1/50/4 )
An alternative to using a system DSN to connect to a MySQL database is the connection string. Connection strings allow us to connect to a database using an ADO connection object and its open method in the same way that we use a system DSN, however, instead of making the connection object retrieve our connection details from a DSN, we explicitly supply them, like this:
adoConn.Open "Driver={mySQL}; Server=localhost; Port=3306; Option=0; Socket=; Stmt=; Database=address; Uid=admin; Pwd=password;"
The connection string to connect to a MySQL database is specified in exactly the same way as that for an SQL Server or Access database. Each parameter is a name/value pair separated by a semi-colon. The details of each of these parameters are shown below:
For more details, please open the link ((http://www.devarticles.com/art/1/50/4 )
Following is the link for downloading the MySQL ODBC driver.
http://www.mysql.com/downloads/api-myodbc.html
Following are the instructions for downloading:
1. Start by firing up your web browser and heading over to http://www.mysql.com/downloads/api-myodbc.html .Take a look under the "Versions" tab on the right hand side of the page and click on MyODBC. At the time of writing, the current version on MyODBC was 2.50.39.
2. Under the "MyODBC for Windows" section, click on the link that matches your operating system. In this article I'm focusing on Windows NT/2000, so click the NT/2000/XP link. This will take you to the mirrors page. Click on the link for the mirror that's closest to you and save the download to a folder on your hard drive (The download is a 1.45MB .zip file, so visit WinZip.com to download WinZip if you haven’t got it already).
3. Once complete, extract the zip file to a temporary directory and run the included setup.exe file. This will install the MyODBC driver. When the installation is completed, simply click on the close button to bypass the data sources con
0 Comments:
Post a Comment
<< Home