In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-02 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article will explain in detail how to use the MySQL database in ASP. The content of the article is of high quality, so the editor shares it for you as a reference. I hope you will have some understanding of the relevant knowledge after reading this article.
What are the ways to implement ASP using MySQL database?
My environment is Windows98+PWS4.0+mysql-3.23.32-win+PHP4.
Necessary software: PWS4.0 (hehe, nonsense)
Mysql-3.23.32-win (this is the latest version)
Myodbc-2.50.36-dll (this is the most important, MYSQLODBC driver, which can be downloaded from www.mysql.com)
Step 1: install the driver for MYSQLODBD and copy the downloaded myodbd-2.50.46-dll file to the windows\ system directory (windows2000
Is winnt/system32) then create a new file with the extension reg (that is, the registry file) and copy the following to the file.
REGEDIT4
[HKEY_LOCAL_MACHINE\ SOFTWARE\ ODBC\ ODBCINST.INI\ myodbcdriver]
"UsageCount" = dword:00000002
"Driver" = "C:\ WINDOWS\\ System\\ myodbc.dll"
"Setup" = "C:\ WINDOWS\\ System\\ myodbc.dll"
"SQLLevel" = "1"
"FileUsage" = "0"
"DriverODBCVer" = "02.50"
"ConnectFunctions" = "YYY"
"APILevel" = "1"
"CpTimeout" = "120"
[HKEY_LOCAL_MACHINE\ SOFTWARE\ ODBC\ ODBCINST.INI\ ODBCDrivers]
"myodbcdriver" = "installed"
Double-click the file after saving to register the above code in the WINDOWS registry.
If installed in windows2000, the values of the Driver and Setup primary keys should be changed accordingly, so I don't need to say much about it here. If successful, you will see the myodbddriver item in the driver of the Control Panel / ODBD data source!
What are the implementation methods of ASP using MySQL database
Step 2: establish the ASP file link database.
There are two ways to do this. One is to create a system DSN in the ODBC data source. Later I found that it was possible to use MYSQL in ASP without building it, and the method is explained below.
Open the control panel / ODBD data source, select the system DSN, and then add a new DSN, and the driver selects myodbddriver, and a dialog box appears for entering information about mysql.
WindowsDSNname: the name of the DSN to be established
MysqlHost (nameorip): the name or IP address of the Mysql server, usually filled in with localhost
Mysqldatabasename: you need to use the name of the database, which is set up in the Mysql manager. Here we use an example. Database name: hc188
There is a data table inside: the user data table has two fields: username and password, just insert a few data.
User: the user name of the linked database. I filled in the root super user.
Password: link database user password. If there is no password, you can leave it empty.
Port (ifnot3306): the port of Mysql on the server. If left empty, it defaults to 3306.
SQLcommandonconnect: use the sql command to link to the database. This can be left unfilled.
After filling in, select OK to save.
Link the ASP code of the database below!
Username
Password
The second method: I have wondered in use if you do not establish the system DSN, can you also use the MYSQL database? The result is OK.
The method is simple: change the second line of the above ASP code to:
Strconnection= "DefaultDir=;Driver= {myodbcdriver}; database=hc188"
I was surprised to find that this method can be used without the need for a user name and password. Is it a BUG of MYSQL?
On how to use the MySQL database in ASP to share here, I hope the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.