Home php教程 php手册 怎样在vc、delphi中使用mysqlmysqlodbc驱动的使用

怎样在vc、delphi中使用mysqlmysqlodbc驱动的使用

Jun 13, 2016 am 10:25 AM
delphi use exist how of drive

怎样在vc、delphi中使用mysql(mysql odbc驱动的使用)
znsoft 2000年7月30日

把它EMAIL给我 我来谈谈我的看法 上一篇 下一篇


怎样在vc、delphi、vb等程序中使用mysql呢(mysql odbc驱动程序的使用)
我们经常会遇到这样问题,怎样在非web程序或asp程序中使用mysql数据库呢?对于这个问题有两个解决方案:
1.使用mysql提供的api函数库。
很多有名的mysql客户端工具就是这样实现的,大名鼎鼎的winmysql工具就是这样的。这在大部分的开发工具中都可以实现。
比如vc,bcb,delphi,vb等,只要能调用第三方的api就能实现。但对程序员的要求很高,而且要熟悉一套mysql的api函数集,这不是对每个人都
很轻松的事。而且这种方法不能用于asp等程序,因为它不支持com对象。
2。第二种是使用myodbc驱动程序。
你可以到www.mysql.com下载myodbc驱动程序,然后照着下面的做就可以了
第一种选择是下载完全安装包,这种包很大,但对于我们来说有用的只有myodbc.dll这个文件,却要下载这么大的文件,不太合适。当然,如果你
很菜的话,我建议你选择这种方式,这样容易些,但不符合cfans的作风,是吧。
第二种是直接下载myodbc.dll文件,只有几百k,但不太容易使用,本人经过很久摸索才找到使用它的方法。
首先你将包解开,将myodbc.dll 文件放到windowssystem 或 winntsystem32目录下,这取决于你的系统是win9x还是winnt(win2k),你应该
知道吧。
然后打开一纯文本编辑器,如editplus,notpad之类,(取决于你的喜好)将下面一段话保存为一文件,扩展名为.reg,知道了吧,这是注册表文件,不要搞
错呀(不包括下面的一长串等号)
如果你用的是win2k请将第一行换成


Windows Registry Editor Version 5.00
==========================================================从下行开始
Windows Registry Editor Version 4.00


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

=======================================结束于上一行
至于为什么要写这些,你就不要问我了,我也不想回答,这是收费门先生说了算的(bill.gates)就这样吧.保存后,双击刚才的文件,应该叫
xxx.reg 吧,然后选择确定,ok,搞定了。然后你打开odbc设置程序,建一新数据源,选择myodbc驱动程序,剩下的就看你自己了,不明白
的话,烦请到程序空间论坛发贴吧.hehe.....
===================================================================================
(C) 程序空间 http://www.znsoft.0733.com 转载烦请保留这句话吧,占不了你多少硬盘的^_^
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

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Does Logitech ghub driver not support win7? -Why can Logitech ghub driver only be installed on the c drive? Does Logitech ghub driver not support win7? -Why can Logitech ghub driver only be installed on the c drive? Mar 18, 2024 pm 05:37 PM

Does Logitech ghub driver not support win7? Not compatible. Since Windows 7 has stopped updating and is no longer Microsoft's main operating system, many new software no longer supports it, such as Logitech ghub. The main interface of the Logitech driver: 1. The main software interface is on the left. The three buttons are lighting, buttons, and sensitivity settings. 2. In the settings of the lighting interface, the general special effects are relatively conventional, and the audio visual effects are the highlight. They can change color according to the sound frequency, and can be set according to the high, middle and bass bands, with different colors and effects. 3. In button settings, users can edit them here according to their special requirements. 4. In the sensitivity settings, many users will have some of their own settings. They can add the DPI speed switching point by themselves, but

What software is crystaldiskmark? -How to use crystaldiskmark? What software is crystaldiskmark? -How to use crystaldiskmark? Mar 18, 2024 pm 02:58 PM

CrystalDiskMark is a small HDD benchmark tool for hard drives that quickly measures sequential and random read/write speeds. Next, let the editor introduce CrystalDiskMark to you and how to use crystaldiskmark~ 1. Introduction to CrystalDiskMark CrystalDiskMark is a widely used disk performance testing tool used to evaluate the read and write speed and performance of mechanical hard drives and solid-state drives (SSD). Random I/O performance. It is a free Windows application and provides a user-friendly interface and various test modes to evaluate different aspects of hard drive performance and is widely used in hardware reviews

Steps to restore Logitech driver to default configuration Steps to restore Logitech driver to default configuration Feb 28, 2024 am 11:04 AM

Facing the Logitech driver that cannot be used normally, it can only be solved by restoring the factory settings. However, many friends do not know how to restore the factory settings. The following will provide you with detailed steps to restore the factory settings. I hope it can help you. Steps to restore the Logitech driver to the default configuration: 1. First download the Logitech dedicated driver software GHub, and open it after the download is complete. 2. Then open the mouse to set up, and click the settings (gear) in the upper right corner. 3. At the bottom, click "Restore default settings" , click directly and reopen the software to restore factory settings. How to connect the Logitech driver to the device 1. Open the back cover of the mouse and take out the wireless mouse socket. 2. Select the mouse socket next to the computer. 3. Set the corresponding parameter information for the mouse. 4. Bluetooth pair the device and long press Bluetooth.

How to download foobar2000? -How to use foobar2000 How to download foobar2000? -How to use foobar2000 Mar 18, 2024 am 10:58 AM

foobar2000 is a software that can listen to music resources at any time. It brings you all kinds of music with lossless sound quality. The enhanced version of the music player allows you to get a more comprehensive and comfortable music experience. Its design concept is to play the advanced audio on the computer The device is transplanted to mobile phones to provide a more convenient and efficient music playback experience. The interface design is simple, clear and easy to use. It adopts a minimalist design style without too many decorations and cumbersome operations to get started quickly. It also supports a variety of skins and Theme, personalize settings according to your own preferences, and create an exclusive music player that supports the playback of multiple audio formats. It also supports the audio gain function to adjust the volume according to your own hearing conditions to avoid hearing damage caused by excessive volume. Next, let me help you

How to download Razer mouse driver How to download Razer mouse driver Mar 11, 2024 pm 03:40 PM

Steps to download the Razer mouse driver: 1. Open the browser and enter the Razer official website; 2. On the official website page, find and click "Technical Support" or a similar option; 3. On the technical support page, select "Mouse" or the specific subcategory; 4. On the mouse driver download page, you can see various mouse models and their corresponding drivers; 5. Click the download link for the selected driver; 6. After the download is completed, check whether the downloaded file is complete , make sure nothing is damaged or missing.

How to use NetEase Mailbox Master How to use NetEase Mailbox Master Mar 27, 2024 pm 05:32 PM

NetEase Mailbox, as an email address widely used by Chinese netizens, has always won the trust of users with its stable and efficient services. NetEase Mailbox Master is an email software specially created for mobile phone users. It greatly simplifies the process of sending and receiving emails and makes our email processing more convenient. So how to use NetEase Mailbox Master, and what specific functions it has. Below, the editor of this site will give you a detailed introduction, hoping to help you! First, you can search and download the NetEase Mailbox Master app in the mobile app store. Search for "NetEase Mailbox Master" in App Store or Baidu Mobile Assistant, and then follow the prompts to install it. After the download and installation is completed, we open the NetEase email account and log in. The login interface is as shown below

How to use Baidu Netdisk app How to use Baidu Netdisk app Mar 27, 2024 pm 06:46 PM

Cloud storage has become an indispensable part of our daily life and work nowadays. As one of the leading cloud storage services in China, Baidu Netdisk has won the favor of a large number of users with its powerful storage functions, efficient transmission speed and convenient operation experience. And whether you want to back up important files, share information, watch videos online, or listen to music, Baidu Cloud Disk can meet your needs. However, many users may not understand the specific use method of Baidu Netdisk app, so this tutorial will introduce in detail how to use Baidu Netdisk app. Users who are still confused can follow this article to learn more. ! How to use Baidu Cloud Network Disk: 1. Installation First, when downloading and installing Baidu Cloud software, please select the custom installation option.

BTCC tutorial: How to bind and use MetaMask wallet on BTCC exchange? BTCC tutorial: How to bind and use MetaMask wallet on BTCC exchange? Apr 26, 2024 am 09:40 AM

MetaMask (also called Little Fox Wallet in Chinese) is a free and well-received encryption wallet software. Currently, BTCC supports binding to the MetaMask wallet. After binding, you can use the MetaMask wallet to quickly log in, store value, buy coins, etc., and you can also get 20 USDT trial bonus for the first time binding. In the BTCCMetaMask wallet tutorial, we will introduce in detail how to register and use MetaMask, and how to bind and use the Little Fox wallet in BTCC. What is MetaMask wallet? With over 30 million users, MetaMask Little Fox Wallet is one of the most popular cryptocurrency wallets today. It is free to use and can be installed on the network as an extension

See all articles