You have 3 options.
1) Use TMySql.Lib // harbour contributions
2) Use dolphin.lib // great class from Mr Daniel
3) Use ADO
For options (1) and (2) you need to
(a) Obtain tmysql.lib or dolphin.lib built for xHarbour or Harbour
(b) Download libmysql.dll from mysql site
(c) Make implib libmysql.lib from libmysql.dll
(d) Link your application with tmysql.lib or dolphin.lib and libmysql.lib
(e) Keep libmysql.dll in the exepath.
There are many users in our forum who are using these libs and can help you where to get them from.
Another option is to use ADO. This is very simple and you can get going in 15 minutes.
We can use full features of the server without being restricted by the limitations of the libraries, if any.
Steps:
1) Download MySql ODBC Connector from MySql site. I advice 32 bit msi.
2) Install it.
All this you can finish in less than 15 mins and you are ready to go, using FWH ADO functions.
This is a sample program to connect to MySql server on my local PC, open a table and browse. This is tested on FWH 15.09 and works.
[code=fw:f50ysp5h][/code:f50ysp5h]
Now, how to use this for your specific need.
You need to know:
a) Your server name. This can be ip address or url provided to you.
b) Database name.
c) User name
d) Password
You may asertain these from the provider.
Use these values in the above program.
First you can check if you successfully connected or not.
If connected, you can open the table you want if you know the table name
↧