FWH 17.03 : Using FWMARIADB for Embedded Server

FWH 17.03 : Using FWMARIADB for Embedded Server

Postby nageswaragunupudi » Mon Mar 20, 2017 9:27 am

It is now possible to use FWMariaDB to create and use MYSQL embedded server from version FWH 17.03, using libmysqld.dll instead of libmariadb.dll (or libmysql.dll). This Possible only with 32 bit Borland and MSVC Harbour / xHarbour. Not possible with 64 bit compliers.

Usage:

1) Download libmysqld.dll
2) Build implib libmysqld.lib for borland or msvc compiler as required.
3) Link the application with this implib instead of libmariadb.dll (or libmysql.lib)
4) Locate or create a folder containing "errmsg.sys" file for the language required. (cLangFolder)
5) Creae a folder for creation of the embedded server.(cDataFolder)
6) Use the same command for connection, specifying cDatFolder (with trailing backslash) as HOST and cLangFolder as LANGFOLDER. Important: cDataFolder should contain trailing backslash.

Syntax:
Code: Select all  Expand view

FWCONNECT oCn HOST cDataFolder [LANGFOLDER cLangFolder] [DATABASE cDatabase]
//OR
oCn := maria_Embedded( cDataFolder, [cDataBase], [cLangFolder] )
 

Notes:
If cDataFolder contains "errmsg.sys" file, cLangFolder can be omitted.
All other functionality remains same as FWMARIADB server and rowsets

New READONLY DATAs:
Code: Select all  Expand view

oCn:lEmbedded  // -> .T. for embedded and .F. otherwise
oCn:cDataFolder
oCn:cLangFolder
 


Unicode

To work with Unicode data, set FW_SetUnicode( .T. ) and then connect to the Server. To get best results, set FW_SetUnicode( .T. ) before creating the server for the first time.

Limitations:
https://dev.mysql.com/doc/refman/5.7/en ... tions.html

Sample:
\fwh\samples\mysqlmbd.prg
build*.bat needs to modified to include the implib ( libmysqld.lib )
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10643
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: FWH 17.03 : MYSQL Embedded Server

Postby Baxajaun » Mon Mar 20, 2017 9:39 am

Mr. Rao,

Great !!!

Best regards,
User avatar
Baxajaun
 
Posts: 968
Joined: Wed Oct 19, 2005 2:17 pm
Location: Gatika. Bizkaia

Re: FWH 17.03 : MYSQL Embedded Server

Postby Maurizio » Mon Mar 20, 2017 10:52 am

Mr. Rao,

Grande !!!

can works with ADO ?

Maurizio
www.nipeservice.com
User avatar
Maurizio
 
Posts: 824
Joined: Mon Oct 10, 2005 1:29 pm

Re: FWH 17.03 : MYSQL Embedded Server

Postby nageswaragunupudi » Mon Mar 20, 2017 11:02 am

ADO itself can not work with embedded MySql.
But ADO application can simultaneously work with FWMYSQL embedded MySql.

You can use ADO to connect to the remote server and use FWH to connect to a local embedded MySql on local Disk. Work with both the connections simultaneously.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10643
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: FWH 17.03 : MYSQL Embedded Server

Postby nageswaragunupudi » Mon Mar 20, 2017 12:13 pm

Update:

In our tests it is possible to connect to both embedded server and also any number of main servers in the same application.
Requirements:
1) Link with libmysqld.lib instead of libmysql.lib
2) Connect to a local embedded server first before connecting to any remote server.

We welcome testing by users and feed back.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10643
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: FWH 17.03 : MYSQL Embedded Server

Postby Horizon » Mon Mar 20, 2017 3:44 pm

Hi to all,

What is the difference with normal version and embedded server? Is it free?

Thank you,
Regards,

Hakan ONEMLI

Harbour & MSVC 2022 & FWH 23.04
Horizon
 
Posts: 1322
Joined: Fri May 23, 2008 1:33 pm

Re: FWH 17.03 : MYSQL Embedded Server

Postby TimStone » Mon Mar 20, 2017 4:29 pm

Available only with 32 bit Borland Harbour / xHarbour.


So it will NOT work with Harbour / MSVC++ ?????
Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
User avatar
TimStone
 
Posts: 2944
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

Re: FWH 17.03 : MYSQL Embedded Server

Postby nageswaragunupudi » Mon Mar 20, 2017 4:45 pm

Horizon wrote:Hi to all,

What is the difference with normal version and embedded server? Is it free?

Thank you,

Normally we need to first install MySql server. Either we install on our PC or a Server or use it.
In case of embedded version, we do not need to install any server.
Stores the data in a local folder. It is easy to distribute such a program to your clients.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10643
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: FWH 17.03 : MYSQL Embedded Server

Postby nageswaragunupudi » Mon Mar 20, 2017 4:47 pm

TimStone wrote:
Available only with 32 bit Borland Harbour / xHarbour.


So it will NOT work with Harbour / MSVC++ ?????

We thought most users who are interested in MySql Emb server are Borland users.

Yes, it works on Harbour/MSVC32 also now. We do more tests before release.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10643
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: FWH 17.03 : MYSQL Embedded Server

Postby TimStone » Mon Mar 20, 2017 5:02 pm

I'm not currently using SQL but keep considering using it. I currently have my primary application distributed in two formats:

1) The most used version is built with FWH / Harbour / MSVC++ ( Visual Studio 2015, and soon 2017 Community editions ). This option allows for features that do not work with other build options, ie. the camera capability.

2) I have a "compatible" version built with xHarbour mainly to support my clients who have 32 bit Advantage Database Server 7 or 8. When compared my customers say it is not as fast or smooth as the Microsoft build.

For me to transition to the MySQL embedded server, it would have to be available for MSVC++.

We have had the discussion here many times on this forum. My belief is that we will see more capabilities for FWH as Windows continues to evolve, and they will be most easily used when building with MSVC++. Since Community 2015 / 2017 is FREE, I'm often puzzled when people revert to older technologies.

So ... If a MSVC++ version becomes available, I will certainly want to work with it.
Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
User avatar
TimStone
 
Posts: 2944
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

Re: FWH 17.03 : MYSQL Embedded Server

Postby nageswaragunupudi » Mon Mar 20, 2017 5:10 pm

Yes, it will be available for embedded server also.
As it is FWH MSV32 connects to installed mysql servers already
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10643
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: FWH 17.03 : MYSQL Embedded Server

Postby TimStone » Mon Mar 20, 2017 5:22 pm

Can you give me any reference where I can learn about that ?

Also, is embedded server single user only, or can multiple users access it across a network ?
Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
User avatar
TimStone
 
Posts: 2944
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

Re: FWH 17.03 : MYSQL Embedded Server

Postby nageswaragunupudi » Mon Mar 20, 2017 5:33 pm

For multi-user usage, install MySql server on the network server or one of the computers. Users from all computers can use it.
FWH from 16.08 onwards works with MySql server on local network or remote or cloud. Works with all compilers Borland, xharbour, harbour, msvc 32 bits , msvc64 and borland 64
We suggest you use this option.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10643
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: FWH 17.03 : MYSQL Embedded Server

Postby TimStone » Mon Mar 20, 2017 5:40 pm

OK ... but I have to learn how to use it. Is there any documentation ? Are the Maria samples showing how to use it in that way ? Are there links to training materials ?

I know there is nothing on the WIKI because I did check that.

Finally, I have seen many discussions about licensing. Can MySQL server Community ( Free ) edition be distributed to clients, or is there a licensing fee if we decided to use it with our application ? In the past, I saw fees posted, but I do not know the policy now. I see that Commercial starts at $ 2,000 and all my clients are businesses. Would they have to pay that fee for the MySQL software ?
Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
User avatar
TimStone
 
Posts: 2944
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

Re: FWH 17.03 : MYSQL Embedded Server

Postby nageswaragunupudi » Mon Mar 20, 2017 5:46 pm

After you download 17.03, please try \fwh\samples\maria01.prg to maria08.prg with buildh32.bat. You do not need to do anything else except to build them with buildh32.bat. Then you also read the sources.
After that we are always here as well as other users to support you to migrate to MySql.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10643
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Next

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 53 guests