I have to establish a connection
with files locate on a web server running mysql and php.
What have i to do ? .
Where can i find some samples :
connection,browse,insert modify , delete
Thanks a lot .
Ph Jacquet .
oMySql := TMSConnect():New()
oMySql:Connect( cHost, cUser, cPassword )
SELE 1
cTabla:='cores_usuarios'
oTabla1 := TMsTable():New( oDataBase, cTabla )
oTabla1:Open()
SELE 1
REDEFINE LISTBOX oBCli;
FIELDS TRANSFORM(oTabla1:xFieldGet( 1 ),'99999'), ;
oTabla1:xFieldGet( 2 ), ;
oTabla1:xFieldGet( 3 ), ;
oTabla1:xFieldGet( 4 ), ;
TRANSFORM(oTabla1:xFieldGet( 5 ),'9999'), ;
..... etc, etc, as usual
REDEFINE GET oCOD VAR wCOD ID 113 OF oDlg PICTURE "@Z 9999" VALID Q_COD( wCOD,"ALT_USU")
...... all the controls as usual
Then, for inserting:
oSql := TMsQuery():Query( oDatabase, "INSERT INTO cores_usuarios (nomcli,usuario,pass,nro_cliente,nivel_acceso) "+;
"VALUES ('"+wDes+"','"+wUsuario+"','"+wClave+"','"+PADL(wCod,4,'0')+"','"+PADL(wCodnivel,1,'0')+"')")
if !oSql:Open()
oSql:oError:Say()
endif
oSql:Close()
oTabla1:setorder(2)
oTabla1:GoTop():Read()
oBcli:Setfocus()
oBcli:Refresh()
oBcli:Upstable()
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: Google [Bot], nageswaragunupudi and 83 guests