Using MyODBC To Access Your MySQL Database Via ASP
MySQL is the most popular open source database system available today, and is currently installed on over two million servers worldwide. In this article Annette takes a look at using the free MyODBC driver to talk to a MySQL database from an ASP script.
Using MyODBC To Access Your MySQL Database Via ASP (Page 1 of 6 )
Active Server Pages are a Microsoft technology that allows developers proficient with either Visual Basic or VBScript to easily adapt their skills and knowledge to the web with very little effort at all. ASP uses ActiveX Data Object (ADO) to connect to several popular database management systems including Microsoft Access and SQL Server, Oracle, dBase and Visual Fox Pro.
Did you know that you can also talk to MySQL databases using ODBC through ASP? The MySQL database can either be on the same server, or on the other side of the world; running Windows, Linux, Solaris, FreeBSD, MacOS X, or any other one of the several operating systems that MySQL supports.
If you've never worked with an open source database management system such as MySQL before, then you’re truly missing out. MySQL is the most popular open source database system available today, and is currently installed on over two million servers worldwide. Huge companies such as Yahoo! Finance, MP3.com and Motorola all use MySQL in their mission-critical application and they swear by it. Best of all, you can use MySQL for free in most circumstances!
In this article we're going to take a look at using the MyODBC driver to talk to a MySQL database in ASP. We will look at two different ways to connect to a MySQL database using the MyODBC driver: via a DSN, and via a connection string. We will use some standard SQL (ANSI) queries to work with tables by adding, updating and deleting records for an address book database. Lastly, MySQL comes with some very handy SQL commands that allow us to view information about databases and tables; we'll take a look at those too.
To get the full benefits of this article, you should have either a Windows NT/2000 machine running IIS and an intermediate knowledge of ASP, ADO and the standard ANSI-compliant SQL syntax.