FWCONNECT NO FUNCIONA

FWCONNECT NO FUNCIONA

Postby pedroluis » Tue Sep 22, 2020 2: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
User avatar
pedroluis
 
Posts: 99
Joined: Sun Oct 08, 2017 12:51 pm
Location: San Luis (Capital), Argentina

Re: FWCONNECT NO FUNCIONA

Postby nageswaragunupudi » Tue Sep 22, 2020 8: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: Select all  Expand view

buildh <yourprgname>
 
Regards

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

Re: FWCONNECT NO FUNCIONA

Postby pedroluis » 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: Select all  Expand view

buildh <yourprgname>
 


Image

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
User avatar
pedroluis
 
Posts: 99
Joined: Sun Oct 08, 2017 12:51 pm
Location: San Luis (Capital), Argentina

Re: FWCONNECT NO FUNCIONA

Postby nageswaragunupudi » Wed Sep 23, 2020 2: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
User avatar
nageswaragunupudi
 
Posts: 10248
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: FWCONNECT NO FUNCIONA

Postby pedroluis » Wed Sep 23, 2020 3: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’s 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
User avatar
pedroluis
 
Posts: 99
Joined: Sun Oct 08, 2017 12:51 pm
Location: San Luis (Capital), Argentina

Re: FWCONNECT NO FUNCIONA

Postby nageswaragunupudi » Wed Sep 23, 2020 3:45 pm

libmysql.dll is enough.

First please study all the links contained here
viewtopic.php?f=3&t=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
User avatar
nageswaragunupudi
 
Posts: 10248
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: FWCONNECT NO FUNCIONA

Postby pedroluis » Wed Sep 23, 2020 9: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
User avatar
pedroluis
 
Posts: 99
Joined: Sun Oct 08, 2017 12:51 pm
Location: San Luis (Capital), Argentina


Return to FiveWin para Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 66 guests