This code worked with the fixes that Mr. Nages sent to me to patch \source\xbrowse.prg, but now it shows this screen:
- Code: Select all Expand view
- "
#include "fivewin.ch"
#include "xbrowse.ch"
function main()
local cStr, oCn, oRs
cStr := "Driver={MySQL ODBC 3.51 Driver};Server=dolphintest.sitasoft.net;" + ;
"Database=dolphin_man;User=test_dolphin;Password=123456;Option=3;"
oCn := FW_OpenAdoConnection( cStr )
if oCn != nil
oRs := FW_OpenRecordSet( oCn, "select * from biblio order by titulo" )
if oRs = nil
msgstop("error opening")
oCn:Close()
RETURN NIL
endif
testLucas( oRs )
oRs:Close()
oRs := Nil
oCn:Close()
else
msgstop( "Failed to Connect")
endif
QUIT
return nil
//----------------------------------------------------------------------------//
//-----------------------------------------------------------------------------
function testLucas( oRs )
local oDlg, oBrw, oCbx, oFont, nWild := 2
local nOpt := 1
DEFINE FONT oFont NAME "TAHOMA" SIZE 0,-14
DEFINE DIALOG oDlg SIZE 900,400 PIXEL ;
TITLE "Test WildSeek v. 2 "+FWVERSION ;
FONT oFont
@ 30,10 XBROWSE oBrw SIZE -10,-10 PIXEL OF oDlg ;
DATASOURCE oRs AUTOCOLS AUTOSORT ;
CELL LINES NOBORDER
WITH OBJECT oBrw
:nMarqueeStyle := 4
:lIncrFilter := .t.
:lSeekWild := .t. //( nWild == 2 )
:cFilterFld := "titulo"
:nStretchCol := STRETCHCOL_WIDEST
:CreateFromCode()
END
@ 10, 80 SAY oBrw:oSeek PROMPT oBrw:cSeek SIZE 120,10 PIXEL OF oDlg ;
COLOR CLR_RED,CLR_YELLOW
@ 10, 300 BUTTON "Clean" ACTION ( oBrw:Seek( "" ), oBrw:Setfocus() ) PIXEL
ACTIVATE DIALOG oDlg CENTERED ;
ON INIT ( oBrw:SetFocus(), .f. )
RELEASE FONT oFont
Return nil
//----------------------------------------------------------------------------//
Also, the program hangs, and the x of the window to close does not work.