Home > Backend Development > PHP Tutorial > How to use mysqlmysqlodbc driver in vc and delphi_PHP tutorial

How to use mysqlmysqlodbc driver in vc and delphi_PHP tutorial

WBOY
Release: 2016-07-13 17:25:52
Original
820 people have browsed it

How to use mysql in vc and delphi (the use of mysql odbc driver)
znsoft July 30, 2000

Email it to me and I will talk about my views Previous articleNext article


How to use mysql in vc, delphi, vb and other programs (use of mysql odbc driver)
We often encounter this problem, how to use it in non-web programs or asp programs What about mysql database? There are two solutions to this problem:
1. Use the api function library provided by mysql.
Many famous mysql client tools are implemented in this way, including the famous winmysql tool. This can be achieved in most development tools.
For example, vc, bcb, delphi, vb, etc., as long as the third-party API can be called, it can be realized. However, the requirements for programmers are very high, and they must be familiar with a set of MySQL API functions. This is not an easy task for everyone. And this method cannot be used for programs such as ASP because it does not support COM objects.
2. The second is to use the myodbc driver.
You can go to www.mysql.com to download the myodbc driver, and then just follow the steps below.
The first option is to download the full installation package. This package is large, but it is useful for us. There is only the file myodbc.dll, but it is not appropriate to download such a large file. Of course, if you
are good at it, I suggest you choose this method. It’s easier, but it’s not in line with cfans’ style, right?
The second method is to download the myodbc.dll file directly. It only has a few hundred kilobytes, but it is not easy to use. It took me a long time to find a way to use it.
First unpack the package and put the myodbc.dll file into the windowssystem or winntsystem32 directory, depending on whether your system is win9x or winnt (win2k), you should
know it.
Then open a plain text editor, such as editplus, notpad, etc. (depending on your preference) save the following paragraph as a file with the extension .reg. You know, this is a registry file. Don’t make the
mistake (excluding the long series of equal signs below)
If you are using win2k, please replace the first line with

Windows Registry Editor Version 5.00
== ================================================== ====== Start from the bottom line
Windows Registry Editor Version 4.00


[HKEY_LOCAL_MACHINESOFTWAREODBCODBCINST.INImyodbc driver]
"UsageCount"=dword:00000002
"Driver"=" C:WINNTSystem32myodbc.dll"
"Setup"="C:WINNTSystem32myodbc.dll"
"SQLLevel"="1"
"FileUsage"="0"
"DriverODBCVer"="02.50"
"ConnectFunctions"="YYY"
"APILevel"="1"
"CpTimeout"="120"
[HKEY_LOCAL_MACHINESOFTWAREODBCODBCINST.INIODBC Drivers]
"myodbc driver"="installed"

==========================================Ends on previous line
As for why I wrote this, don’t ask me. I don’t want to answer. This is what Mr. Bill.gates has the final say. That’s it. After saving, double-click the file just now. It should be called
xxx.reg, and then select OK, ok, done. Then you open the odbc setup program, create a new data source, select the myodbc driver, and the rest is up to you. If you don't understand
, please post it on the program space forum.hehe....
================================================== ==================================
(C) Program space http://www.znsoft. 0733.com Please keep this sentence when reprinting, it won’t take up much of your hard drive ^_^

http://www.bkjia.com/PHPjc/532023.htmlwww.bkjia.comtruehttp: //www.bkjia.com/PHPjc/532023.htmlTechArticleHow to use mysql in vc and delphi (use of mysql odbc driver) znsoft put it on July 30, 2000 EMAIL me and let me talk about my opinions. Previous article Next article How to use vc, delphi, vb and other programs...
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template