Access MySQL guide with ODBC interface

Source: Internet
Author: User
Tags odbc
Access MySQL guide with ODBC interface
Current Author: Wang Mei (HeartIcy@163.com)
Date Created: January 15, 2003
Revised version: 1.1
MySQL's good and bad I think about it. I always think that this is not what a programmer or system designer should delve into.
If there is a right choice, what the programmer or system designer should do is to choose the most economical and appropriate solution for the project
Case. MySQL is just one of the many solutions that should really not be delved into.
MySQL's ODBC interface implementation is through the installation of MYODBC driver, this driver is cross-platform. If in Linux and other
UNIX system operating system, you need to first install IODBC these third-party ODBC standard support platform.
Simple ASP Sample code:
<%
Dim sql,mysql
Set sql = Server.CreateObject ("Adodb.connection")
Mysql= "Driver={mysql ODBC 3.51 driver};d atabase= Library; server= host; uid= user; password
= password; ' option = Set
Sql.open MySQL
%>
The above code is an example of a MYODBC development version 3.51 connection, using the development version because of some new features and stability
2.x is not available in the official edition. A few days ago I read a tutorial on how to write a security program written by Microsoft security experts. mentioned above
If the code for the ASP file is seen by the hacker, the database may not be insured, and then a
Even a string of questions that were even captured by administrative authority. In the article, the workaround is by writing COM components and then by
ASP invokes the method of the component to connect to the database. The advantage of doing this is improving security, but the problem is that people who have the ability to do so
is, after all, a handful. So my compromise is to define the data source. Store, user, password, and set these connection information in
The definition of a data source simplifies the implementation to a large extent and also enhances security. Of course, in order to protect
The data source can be accessed in the actual operating environment, must be defined as "system data source", defined as "user
Data source or system data source I think it's harmless.
ASP sample code using the data source
<%
Dim sql
Set sql = Server.CreateObject ("Adodb.connection")
Sql.open "Dns=mysql Data Source Name"
%>
Originally I wanted to talk about some specifics of the configuration parameters, but I saw that Myodbc's reference manual was short and clear, so I didn't
and swim a fish. If you have any questions about this article you can contact me via email-HeartIcy@163.com. H
Hope to get to know more friends.
I hope this guide will be of use to you.
* * This document is issued in accordance with the Free Software Foundation General Document License Agreement * *

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.