FWH 17.03 : Using FWMARIADB for Embedded Server

Re: FWH 17.03 : Using FWMARIADB for Embedded Server

Postby fraxzi » Wed Aug 08, 2018 1:26 am

Hi All,

I successfully run sample 'mysqlmbd.prg', it created data on a folder I specify..
but on the line...

Code: Select all  Expand view  RUN

   REQUEST DBFCDX
   ...
   oCn:importfromdbf( "customer.dbf" )   // <<= it quits here
   ...
 


It quits with no logs or nothing to trace...

:?:
Kind Regards,
Frances

Fivewin for xHarbour v18.07
xHarbour v1.2.3.x
BCC 7.3 + PellesC8 ( Resource Compiler only)
ADS 10.1 / MariaDB
Crystal Reports 8.5/9.23 DE
xMate v1.15
User avatar
fraxzi
 
Posts: 811
Joined: Tue May 06, 2008 4:28 am
Location: Philippines

Re: FWH 17.03 : Using FWMARIADB for Embedded Server

Postby MarioG » Wed May 13, 2020 11:58 pm

[quote="nageswaragunupudi"]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.

Hello;
I download de last version of Mariadb Server, 10.5.3
When I launch:
D:\Bat>implib libmariadb.lib libmariadb.dll
Return that error:
Embarcadero Implib Version 3.3.0 Copyright (c) 1991-2014 Embarcadero Technologies, Inc.
Error libmariadb.dll: unknown file type

My BCC is: Embarcadero C++ 7.00 for Win32 Copyright (c) 1993-2015 Embarcadero Technologies, Inc. and;
my implib is: Embarcadero Implib Version 3.3.0 Copyright (c) 1991-2014 Embarcadero Technologies, Inc.
Resistencia - "Ciudad de las Esculturas"
Chaco - Argentina
User avatar
MarioG
 
Posts: 1380
Joined: Fri Oct 14, 2005 1:28 pm
Location: Resistencia - Chaco - AR

Re: FWH 17.03 : Using FWMARIADB for Embedded Server

Postby nageswaragunupudi » Thu May 14, 2020 3:46 am

You posted this under the topic Embedded server.

For using embedded server,

1. You do not have to install MySql server or MariaLib server
2. What all you need is "libmysqld.dll"
3. We do not get this dll along with either Mysql server / MariaLib server installations. We need to download it separately.

In case you are not talking about Ebedded server, but normal Mariadb server,

D:\Bat>implib libmariadb.lib libmariadb.dll
Return that error:
Embarcadero Implib Version 3.3.0 Copyright (c) 1991-2014 Embarcadero Technologies, Inc.
Error libmariadb.dll: unknown file type


It is likely that the dll is 64-bit, not 32-bit.

Instead you may use the dll and lib that come with fwh
\fwh\dll\libmariadb.dll
\fwh\lib\libmariadb.lib
Regards

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

Re: FWH 17.03 : Using FWMARIADB for Embedded Server

Postby MarioG » Thu May 14, 2020 3:32 pm

Mr Rao
many thanks
Resistencia - "Ciudad de las Esculturas"
Chaco - Argentina
User avatar
MarioG
 
Posts: 1380
Joined: Fri Oct 14, 2005 1:28 pm
Location: Resistencia - Chaco - AR

Re: FWH 17.03 : Using FWMARIADB for Embedded Server

Postby Marcelo Roggeri » Sat Jun 12, 2021 10:52 pm

Hola buenas noches siguiendo el hilo, quiero reportar que yo tengo el mismo problema.

implib libmariadb.lib libmariadb.dll

Embarcadero Implib Version 3.3.0 Copyright (c) 1991-2014 Embarcadero Technologies, Inc.
Error : unable to open file

Que debería hacer? para poder utilizar mysql embebido?

Saludos
FWH - Harbour - BCC7 - PellesC
User avatar
Marcelo Roggeri
 
Posts: 342
Joined: Sat Jul 22, 2006 9:04 pm
Location: Venado Tuerto - Santa Fe -Argentina

Re: FWH 17.03 : Using FWMARIADB for Embedded Server

Postby goosfancito » Fri Jul 21, 2023 10:36 am

pudiste solcionar este problema?
FWH 21.02
Harbour 3.2.0dev (r2104281802)
Copyright (c) 1999-2021, https://harbour.github.io/
User avatar
goosfancito
 
Posts: 1954
Joined: Fri Oct 07, 2005 7:08 pm

Re: FWH 17.03 : Using FWMARIADB for Embedded Server

Postby carlos vargas » Fri Jul 21, 2023 6:25 pm

goos puedes contactarme por mail karlos.vargas at gmail dot com, o al 505 8767 4989 por what
lo miramos por anydesk, yo tengo un modulo con en mysql embebido.
Salu2
Carlos Vargas
Desde Managua, Nicaragua (CA)
User avatar
carlos vargas
 
Posts: 1721
Joined: Tue Oct 11, 2005 5:01 pm
Location: Nicaragua

Re: FWH 17.03 : Using FWMARIADB for Embedded Server

Postby carlos vargas » Sat Jul 22, 2023 2:02 am

carlos vargas wrote:goos puedes contactarme por mail karlos.vargas at gmail dot com,
lo miramos por anydesk, yo tengo un modulo con en mysql embebido.
Salu2
Carlos Vargas
Desde Managua, Nicaragua (CA)
User avatar
carlos vargas
 
Posts: 1721
Joined: Tue Oct 11, 2005 5:01 pm
Location: Nicaragua

Re: FWH 17.03 : Using FWMARIADB for Embedded Server

Postby goosfancito » Sat Jul 22, 2023 4:38 am

Carlos! como vas? ya pude solucionarlo en breve subo un paquete funcional.

gracias.
FWH 21.02
Harbour 3.2.0dev (r2104281802)
Copyright (c) 1999-2021, https://harbour.github.io/
User avatar
goosfancito
 
Posts: 1954
Joined: Fri Oct 07, 2005 7:08 pm

Re: FWH 17.03 : Using FWMARIADB for Embedded Server

Postby FranciscoA » Sat Apr 20, 2024 6:09 pm

Goos,
Puedes darme un luz de como solucionaste el uso de mysql embebido?
Gracias.
Francisco J. Alegría P.
Chinandega, Nicaragua.

Fwxh-MySql-TMySql
User avatar
FranciscoA
 
Posts: 2159
Joined: Fri Jul 18, 2008 1:24 am
Location: Chinandega, Nicaragua, C.A.

Re: FWH 17.03 : Using FWMARIADB for Embedded Server

Postby FranciscoA » Sat Apr 20, 2024 6:17 pm

Fraxzi, lo solucionaste?
Puedes darme una luz?
Gracias
Francisco J. Alegría P.
Chinandega, Nicaragua.

Fwxh-MySql-TMySql
User avatar
FranciscoA
 
Posts: 2159
Joined: Fri Jul 18, 2008 1:24 am
Location: Chinandega, Nicaragua, C.A.

Re: FWH 17.03 : Using FWMARIADB for Embedded Server

Postby FranciscoA » Mon Apr 22, 2024 5:00 pm

Nobody?
Francisco J. Alegría P.
Chinandega, Nicaragua.

Fwxh-MySql-TMySql
User avatar
FranciscoA
 
Posts: 2159
Joined: Fri Jul 18, 2008 1:24 am
Location: Chinandega, Nicaragua, C.A.

Re: FWH 17.03 : Using FWMARIADB for Embedded Server

Postby nageswaragunupudi » Tue Apr 23, 2024 9:56 pm

FranciscoA wrote:Nobody?


This is how you can use Embedded Server using FWH library.

We need 3 files for this:
1. libmysqld.dll:
Required to be kept in exe folder. We already have this in \fwh\samples folder.
2. libmysqld.lib:
Imblib for this dll. Required for linking. We should use this but not libmyql.lib
We already have this in our \fwh\lib\ folder
3. errmsg.sys:
language specific err messages. Required to be kept in some folder.
This file is not readily available in FWH folders. If you installed dolhpin, you may file it in dolphin folders or in some mysql installation folders. If you do not find it on your disk, ..
Please download this file "errmsg.fwh" from the link:
https://github.com/FiveTechSoft/FWH_too ... errmsg.fwh
Copy the downloaded file to fwh\samples\ folder and then rename it as "errmsg.sys". (This is important)

Now, make this small modification to buildh.bat
Open "notepad.exe buildh.bat" and locate the line
Code: Select all  Expand view  RUN
echo %fwh%\lib\FiveH.lib %fwh%\lib\FiveHC.lib %fwh%\lib\libmysql.lib + >> b32.bc

Change "libmysql.lib" as "libmysqld.lib" and save.

Now we are ready.
As a final check, make sure we have these 3 files in these folders:
Code: Select all  Expand view  RUN
\fwh\lib\libmysqld.lib
\fwh\samples\libmysqld.dll
\fwh\samples\errmsg.sys



We need to choose some folder to hold our database on our disk.
Suppose we choose "C:\MYDATA\"
Then try this program:
Code: Select all  Expand view  RUN

#include "fivewin.ch"

REQUEST DBFCDX

function Main()

   local oCn

   FWCONNECT oCn HOST "C:\MYDATA\"     ;  // "Your Data folder
           LANGFOLDER TrueName( ".\" ) ;  // "folder where errmsg.sys file is located
             DATABASE "fwh"

   if ocn == nil
      ? "Connect fail"
   else
      ocn:importfromdbf( "customer.dbf" )
      ocn:importfromdbf( "states.dbf" )
      xbrowser ocn:customer NOMODAL
      xbrowser ocn:states
      ocn:close()
   endif

return nil

Save this sample prg to fwh\samples folder and build it with the modified buildh.bat
Done:
Regards

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

Re: FWH 17.03 : Using FWMARIADB for Embedded Server

Postby FranciscoA » Wed Apr 24, 2024 4:13 pm

Rao, muchas gracias por tu tiempo.
Mañana tendré tiempo para intentarlo.
Francisco J. Alegría P.
Chinandega, Nicaragua.

Fwxh-MySql-TMySql
User avatar
FranciscoA
 
Posts: 2159
Joined: Fri Jul 18, 2008 1:24 am
Location: Chinandega, Nicaragua, C.A.

Previous

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 52 guests