Gracias
Anexo codigo
Code: Select all
#Include "Fivewin.ch"
Function Main()
LOCAL oDados, txSql , oCn , oBrow, oFont, oDlg
oCn := CREATEOBJECT( "ADODB.Connection" )
oCn:OPEN("DRIVER={MySQL ODBC 3.51 DRIVER};SERVER=Localhost;DATABASE=basedatm;USER=root;PASSWORD=kate1984")
txSql := "SELECT * FROM ktipmod; "
oDados := oCn:Execute( txSql)
DEFINE FONT oFont NAME "Georgia" SIZE 0,-15
DEFINE DIALOG oDlg FROM 0,0 TO 550,800 PIXEL TITLE "Ado Connections My SQL"
@ 1,1 LISTBOX oBrow FIELDS oDados:Fields(0):Value ,;
oDados:Fields(1):Value ,;
oDados:Fields(2):Value ;
HEADERS "Field 1","Field 2","Field 3" SIZE 350,250 PIXEL OF oDlg
ACTIVATE DIALOG oDlg
RETURN NIL
[code]