Home > Back-end >  BCB6 MyDAC access Mysql connection times wrong
BCB6 MyDAC access Mysql connection times wrong

Time:10-02

Content of the error is "# 8 s01 bad handshake"

MyDAC version 5.2
Mysql version is 5.6
Because MyDAC version is too low so error

As if can't find forBCB6 MyDAC8 more available online version,
If an error because version problem, which a great god knows where MyDAC8 above and can be used?

Or what other methods can use BCB6 access MySQL

CodePudding user response:

I met the same problem, ask!

CodePudding user response:

Mysql's official website to download the
Mysql connector - c - 6.0.2.zip
In BCB in MySQL C API method of direct connection MySQL:

1, install MySQL and properly set
2, in MySQL installation directory to find or lib \ debug \ lib \ opt, both directory have libmysql. DLL and libmysql. The lib, the dynamic link library is what we are trying to call BCB dongdong, but because of the DLL is compiled using VC, unlike BCB DLL format, so you need to use implib tool to export libmysql. Lib, in command line mode format for:
C: \ & gt; Implib NewName. The lib libmysql. DLL
New export NewName. 3, will just copy.lib file into your application created directory
4, under the BCB menu choices: project - & gt; Add to the Project, and then in the popup file dialog box select NewName. The lib
5, under the BCB menu choices: project - & gt; Option - & gt; Directories/Conditionals, MySQL will include and lib directory is appended to the inside, like my is:
The include path: (original); C: \ Program Files \ MySQL \ MySQL Server 4.1 \ include
The Library path: (original); C: \ Program Files \ MySQL \ MySQL Server 4.1 \ lib \ debug
Or: (original); C: \ Program Files \ MySQL \ MySQL Server 4.1 \ lib \ opt
On the Library path, you can choose one the best with what you export. Consistent.lib file directory
6, in the Form you want to use the API page. CPP file first add:
#include
The. H file is of API functions and types of
7, MySQL USES the SOCKET in VC macro, so in BCB to additional description
Typedef unsigned int the SOCKET;
If not this one, compile error will
8, OK, the attorney the rest of your code, then use the MySQL C API function to verify,
  • Related