FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin para Harbour/xHarbour FWCONNECT NO FUNCIONA
Posts: 117
Joined: Sun Oct 08, 2017 12:51 PM
FWCONNECT NO FUNCIONA
Posted: Tue Sep 22, 2020 02:04 PM

Buenos dias se帽ores:
Tal vez no me he explicado bien.
Con el c贸digo siguiente y con los par谩metros basados en un sitio verificado y funcionando,
al ejecutar el siguiente c贸digo, no s贸lo no me muestra nada, sin贸 que me saca de la
pantalla sin mostrar absolutamente nada.

FWCONNECT oCn HOST cServername USER cUsername PASSWORD cPassword DB cDatabasename
if oCn == nil
? "Connect Fail"
return nil
else
oRs := oCn:RowSet( "lecturas" ) // "lecturas" es una tabla de cDatabasename
XBROWSER oRs FASTEDIT
oCn:Close()
endif

Les agradecer铆a mucho vuestra opini贸n.
Gracias !
return nil

Pedro L. Lavallen

San Luis (Capital), Argentina
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: FWCONNECT NO FUNCIONA
Posted: Tue Sep 22, 2020 08:10 PM
It is clear.

Let us test it step by step.
Please copy this program to \fwh\samples folder and then build and run with
buildh.bat or buildx.bat.

Code (fw): Select all Collapse
buildh <yourprgname>
Regards



G. N. Rao.

Hyderabad, India
Posts: 117
Joined: Sun Oct 08, 2017 12:51 PM
Re: FWCONNECT NO FUNCIONA
Posted: Tue Sep 22, 2020 10:23 PM
nageswaragunupudi wrote:It is clear.

Let us test it step by step.
Please copy this program to \fwh\samples folder and then build and run with
buildh.bat or buildx.bat.

Code (fw): Select all Collapse
buildh <yourprgname>




It's Work Mr.Rao !!!
Lo prob茅 donde ud. me indic贸 y funcion贸.


HB_SetCodePage("TRWIN")
FWCONNECT oCn HOST cServername USER cUsername PASSWORD cPassword DB cDatabasename PORT 3306 CHARSET "latin5"
if oCn == nil
msginfo("Error de conexi贸n")
return nil
else
msginfo("Se conecto !!!")
XBROWSER oCn:lecturas
* oCn:Close()
endif
return nil
Pedro L. Lavallen

San Luis (Capital), Argentina
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: FWCONNECT NO FUNCIONA
Posted: Wed Sep 23, 2020 02:39 AM

So,
1) Please ensure you are linking all the libs in buildx.bat / buildh.bat in your application script.
2) Copy the same libmysql.lib from fwh\samples folder to your exe path.

Regards



G. N. Rao.

Hyderabad, India
Posts: 117
Joined: Sun Oct 08, 2017 12:51 PM
Re: FWCONNECT NO FUNCIONA
Posted: Wed Sep 23, 2020 03:11 PM
nageswaragunupudi wrote:So,
1) Please ensure you are linking all the libs in buildx.bat / buildh.bat in your application script.
2) Copy the same libmysql.lib from fwh\samples folder to your exe path.


The link was the same as the buildx.bat. What I did was add libmysql.dll and libmariadb.dll to my folder and it worked.
If it鈥檚 not too much to ask, would you be kind enough to give me a link to start developing programs with mariadb as for newbies ?
Thank you very much for your help!
Greetings from Argentina !
Pedro Lavall茅n.
Pedro L. Lavallen

San Luis (Capital), Argentina
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: FWCONNECT NO FUNCIONA
Posted: Wed Sep 23, 2020 03:45 PM

libmysql.dll is enough.

First please study all the links contained here

viewtopic.php?f=3t=33286
Here, you find links to WIKI also.

Please also study all maria*.prg samples in fwh\samples folder.

Basically you need to learn
1) to "connect to the server" and handle the connection object.
2) to open data (tables) as rowsets and handle rowset class.

We are always here to support you at any time.

&

Regards



G. N. Rao.

Hyderabad, India
Posts: 117
Joined: Sun Oct 08, 2017 12:51 PM
Re: FWCONNECT NO FUNCIONA
Posted: Wed Sep 23, 2020 09:43 PM

Thank you very much my friend.
I will study the topics you suggest.
A big hug !

Pedro L. Lavallen

San Luis (Capital), Argentina

Continue the discussion