taà o código
#include 'inkey.ch'
#include 'box.ch'
#include "sqllib.ch"
#include "fivewin.ch"
REQUEST MySQL
REQUEST SQLLib
/*
Sistema.................Posto de Venda
Programa................Vegaz.Prg > Sistema de Menus
Responsavel.............Eduardo Mendes (Cones Informatica)
*/
FUNCTION MAIN()
local omenu, ownd, obar, oBMp, oBrush
nWidth := 0
nHeight := 0
mProp :=" nome"
SQL CONNECT ON "localhost";
PORT 3306 ;
DATABASE "mycones_fwh" ;
USER "root" ;
PASSWORD 'cones';
OPTIONS SQL_NO_WARNING ;
LIB 'MySQL'
rddsetdefault("MySQL")
IF SQL_ErrorNO() > 0
Alert( "Não foi possÃvel conectar ao banco de dados !;"+;
"Informe esta mensagem ao suporte : ;"+;
SQL_ErrorMsg() )
Return( .F. )
ELSE
MsgInfo ("Conexão efetuada com sucesso")
ENDIF
SET PACKETSIZE TO 20
SET(39,159)
........
Eduardo Mendes
Fivewin 2.6 + xHarbour