Maestro, porque esta versi贸n sali贸 tan tarde? Estamos pensando en la compra de la corriente FiveWin, me pregunto si es estable, o deber铆a esperar un poco?
Gracias, saludos.
Maestro, porque esta versi贸n sali贸 tan tarde? Estamos pensando en la compra de la corriente FiveWin, me pregunto si es estable, o deber铆a esperar un poco?
Gracias, saludos.
Joao, es estable, y no hay ningun problema
Ha salido m谩s tarde para incluir en esta versi贸n FwMysql y realizar pruebas
Antonio te lo confirmar谩
cnavarro wrote:Joao, es estable, y no hay ningun problema
Ha salido m谩s tarde para incluir en esta versi贸n FwMysql y realizar pruebas
Antonio te lo confirmar谩
Totalmente estable y probada
Maestro Antonio
fivewin 16.05
Experiencia con tMySql nuevo y comparando con ADO
Para un oRcs
1) oRcs:Clone(),oRcs:Open() y oRcs:Close()
uso directamente oRcs := oConexion:Query("") trabaja perfecto
2) oRcs:Update()
uso oRcs:Save() trabaja bien, sin embargo cada tabla debe tener un indice principal
3) DefinedSize logitud campo
Precision longitud campo numerico
NumericScale cantidad de decimales
Uso
oRcs:FieldLen(oRcs:FieldPos(cCampo))
oRcs:FieldDec(oRcs:FieldPos(cCampo))
La pregunta pueden hacer algo equivalente a ADO
oRcs:Fields(cCampo):Precision
oRcs:Fields(cCampo):NumericScale
mas eso en el caso de variable numericas da valores que no coinciden en la longitud
Ejemplo: con
a) Campo VARCHAR (type "C" caracter) esta bien con FieldLen
b) Campo DECIMAL (type "N" numerico) la longitud no coincide en algunoTEXYs casos pero los decimales si est谩n bien con FieldDec
c) Campo INT (type "C" y debe numerico) la longitud no coincide y tal vez que no tiene decimales siempre da 31 con FielDec
d) Campo TINYINT (type "C" y debe numerico) la longitud no coincide y tal vez que no tiene decimales siempre da 31 con FielDec
e) Campo DATE (type "D" fecha) la longitud es 17 con FieldLen
f) Campo TEXT (type "m" memo) la longitud est谩 bien con FieldLen
4) Sort
oRcs:Sort:= cCampo + " ASC"
oRcs:Sort:= cCampo + " DESC"
oRcs:SetOrder( c, u, lDescend )
no sirvi贸
para guiarme revis茅 tarrdata.prg y datarow.prg
NOTA PARA 64 bits no sirve da error ni con la libreria libmariadb64.lib ni libmysql64.lib
Dice: La aplicaci貌n no se pudo iniciar correctamente (0xc000007b)
En windows XP
oBrw:aCols[ 1 ]:SetCheck( { "Imagenes\level1.bmp", "Imagenes\level2.bmp" }, {|| algo()})
no sirve no salen los bmp, prob猫 agregandole
oBrw:aCols[ 1 ]:bStrData := { || If(Tabla->CHECKP, "S", "N" ) }
oBrw:aCols[ 1 ]:nDataStrAlign := AL_RIGHT
me muestra la S o N y al darle doble click hace lo que debe hacer
Luis,
gracias por la informaci贸n
vamos a revisarlo cuanto antes
1) oRcs:Clone(),oRcs:Open() y oRcs:Close()
uso directamente oRcs := oConexion:Query("") trabaja perfecto
2) oRcs:Update()
uso oRcs:Save() trabaja bien, sin embargo cada tabla debe tener un indice principal
3) DefinedSize logitud campo, ...........
4) Sort
oRcs:= cCampo + " ASC"
oRcs:= cCampo + " DESC"
oRcs:SetOrder( c, u, lDescend )
no sirvi贸
NOTA PARA 64
#include "fivewin.ch"
#include "xbrowse.ch"
function Main()
聽 聽local oWnd
聽 聽 oConexion := mysql_Connect( { "localhost", "rovigo", "root", "1223", "3306" } )
聽 聽 If oConexion == nil
聽 聽 聽 聽msginfo("error base de datos")
聽 聽 聽 聽return(.f.)
聽 聽 EndIf
聽 聽 oRcs := oConexion:Query("Select CodCli,NomCli From Clientes Limit 5")
聽 聽 If oRcs==Nil
聽 聽 聽 聽msginfo("error tabla")
聽 聽聽Return(.f.)
聽 聽 EndIf
聽 聽define window ownd
聽 聽 聽 聽 聽 聽 oBrw := brow(oWnd,oRcs)
聽 聽activate window oWnd
return nil
Procedure brow(oWnd,oRcs)
聽 聽 聽 聽 聽oBrw := TXBrowse():New( oWnd )
聽 聽聽 聽oBrw:lFlatStyle 聽 聽 聽 := .t.
聽 聽 聽 聽 聽oBrw:l2007 聽 聽 聽 聽 聽 聽:= .f.
聽 聽 聽 聽 oBrw:lKinetic 聽 聽 聽 聽 := .f.
聽 聽 聽 聽 oBrw:lExcelCellWise 聽 := .t. 聽 聽 聽聽 聽 聽 聽
聽 聽 聽 聽 oBrw:nTop 聽 聽:= 0
聽 聽 聽 聽 oBrw:nLeft 聽 := 0
聽 聽 聽 聽 oBrw:nBottom := 500
聽 聽 聽 聽 oBrw:nRight 聽:= 400
聽 聽 聽 聽
聽 聽 聽 聽 oBrw:lAllowRowSizing 聽 聽 := .f.
聽 聽 聽 聽 聽oBrw:lAllowColHiding 聽 聽 := .f.
聽 聽 聽 聽 聽 oBrw:lColDividerComplete := .t. 聽 聽
聽 聽 聽 聽 oBrw:nColDividerStyle 聽 聽:= LINESTYLE_BLACK
聽 聽 聽 聽 oBrw:nRowDividerStyle 聽 聽:= LINESTYLE_BLACK
聽 聽 聽 聽 聽 oBrw:lColDividerComplete := .t. //completa pintado sobre el footer cuando lineas no llenan todo el browse
聽 聽 聽 聽 聽 oBrw:nRowSel 聽 聽 聽 聽 聽 聽 := 1
聽 聽 聽 聽 聽 oBrw:nRowHeight 聽 聽 聽 聽 聽:= 35 //altura entre lineas
聽 聽 聽 聽 聽 oBrw:nMarqueeStyle 聽 聽 聽 := MARQSTYLE_HIGHLCELL //solo ilumina la celda actual
聽 聽 聽 聽 聽 oBrw:lHeader 聽 聽 聽 聽 聽 聽 := .t. //Que tendr谩 cabecera
聽 聽 聽 聽 聽 oBrw:nHeaderHeight 聽 聽 聽 := 60 //Altura cabeceras de col
聽 聽 聽 聽 oBrw:nHeaderLines 聽 聽 聽 聽:= 2
聽 聽 聽 聽 聽 oBrw:lFooter 聽 聽 聽 聽 聽 聽 := .t. //Que tendr谩 footer
聽 聽 聽 聽 聽 oBrw:nFooterLines 聽 聽 聽 聽:= 2 //Lineas del footer
聽 聽 聽 聽 聽 oBrw:nFooterHeight 聽 聽 聽 := 35 //Altura del Footer
聽 聽 聽 聽 聽 oBrw:lRecordSelector 聽 聽 := .t. //poner o no, COL de la flechita de la izq
聽 聽 聽 聽 oBrw:AddCol():bEditValue := { || oRcs:Fields("codcli"):value }
聽 聽 聽 聽 oBrw:aCols[ 1 ]:cHeader 聽 聽 聽 := "C贸digo"
聽 聽 聽 聽 oBrw:aCols[ 1 ]:nHeadStrAlign := AL_CENTER
聽 聽 聽 聽 聽 oBrw:aCols[ 1 ]:AddBmpFile( "up.bmp" )
聽 聽 聽 聽 聽 oBrw:aCols[ 1 ]:AddBmpFile( "down.bmp" )
聽 聽 聽 聽 聽 oBrw:aCols[ 1 ]:nHeadBmpAlign := AL_RIGHT
聽 聽 聽 聽 聽oBrw:aCols[ 1 ]:nWidth 聽 聽 聽 聽:= 150
聽 聽 聽 聽 聽oBrw:aCols[ 1 ]:bLClickHeader := {|r,c,f,o| FunSort(oBrw,oRcs)}
聽 聽 聽 聽 oBrw:AddCol():bEditValue := { || oRcs:Fields("nomcli"):value }
聽 聽 聽 聽 oBrw:aCols[ 2 ]:cHeader 聽 聽 聽 := "Nombre"
聽 聽 聽 聽 oBrw:aCols[ 2 ]:nHeadStrAlign := AL_CENTER
聽 聽 聽 聽 聽 oBrw:aCols[ 2 ]:AddBmpFile( "up.bmp" )
聽 聽 聽 聽 聽 oBrw:aCols[ 2 ]:AddBmpFile( "down.bmp" )
聽 聽 聽 聽 聽 oBrw:aCols[ 2 ]:nHeadBmpAlign := AL_RIGHT
聽 聽 聽 聽 聽oBrw:aCols[ 2 ]:nWidth 聽 聽 聽 聽:= 150
聽 聽 聽 聽 聽oBrw:aCols[ 2 ]:bLClickHeader := {|r,c,f,o| FunSort(oBrw,oRcs)}
聽 聽 聽 聽 聽 oBrw:SetMySql(oRcs)
聽 聽聽 聽oBrw:CreateFromCode()
Return(oBrw)
//
Function FunSort(oBrw,oRcs)
聽 聽 oRcs:Sort:= "nomcli ASC"
聽 聽 //Verifico si me est谩 ordenando y si lo ordena
聽 聽 oRcs:movefirst()
聽 聽 while !oRcs:Eof()
聽 聽 聽 聽 msginfo(oRcs:Fields("nomcli"):Value)
聽 聽 聽 聽oRcs:MoveNext()
聽 聽 EndDo
聽 聽 oRcs:movefirst()
聽 聽 //oRcs:Requery()
聽 聽 //No me refresca con .t. y sin .t.
聽 聽oBrw:Refresh(.t.)
聽 聽 Return nilfunction brow( oWnd, oRcs )
聽 聽local oBrw
聽 聽@ 0,0 XBROWSE oBrw SIZE 400,500 PIXEL OF oWnd ;
聽 聽 聽 DATASOURCE oRcs ;
聽 聽 聽 COLUMNS "codcli", "nomcli" ;
聽 聽 聽 HEADERS "C贸digo", "Nombre" ;
聽 聽 聽 COLSIZES 150,150 ;
聽 聽 聽 AUTOSORT FOOTERS CELL LINES NOBORDER
聽 聽WITH OBJECT oBrw
聽 聽 聽 :nHeadStrAligns 聽 聽 聽:= AL_CENTER
聽 聽 聽 :nHeaderHeight 聽 聽 聽 := 60
聽 聽 聽 :nFooterHeight 聽 聽 聽 := 30
聽 聽 聽 :nRowHeight 聽 聽 聽 聽 聽:= 35
聽 聽 聽 //
聽 聽 聽 :CreateFromCode()
聽 聽END
return oBrw#include "fivewin.ch"
#include "xbrowse.ch"
function Main()
聽 聽local oWnd
聽 聽cbuscar=space(20)
聽 聽 oConexion := mysql_Connect( { "localhost", "rovigo", "root", "1223", "3306" } )
聽 聽 If oConexion == nil
聽 聽 聽 聽msginfo("error base de datos")
聽 聽 聽 聽return(.f.)
聽 聽 EndIf
聽 聽 oRcs := oConexion:Query("Select CodCli,NomCli From Clientes Limit 20")
聽 聽 If oRcs==Nil
聽 聽 聽 聽msginfo("error tabla")
聽 聽聽Return(.f.)
聽 聽 EndIf
聽 聽DEFINE DIALOG oDlg SIZE 600, 600
聽 聽
聽 聽 聽 聽 聽 聽 oBrw := brow(oWnd,oRcs)
聽 聽 聽 聽 聽 聽 @20,0 get obuscar var cbuscar valid filtrar()
聽 聽ACTIVATE DIALOG oDlg CENTER
return nil
Procedure brow(oWnd,oRcs)
聽local oBrw
聽 聽@ 0,0 XBROWSE oBrw SIZE 200,200 PIXEL OF oWnd ;
聽 聽 聽 DATASOURCE oRcs ;
聽 聽 聽 COLUMNS "codcli", "nomcli" ;
聽 聽 聽 HEADERS "C贸digo", "Nombre" ;
聽 聽 聽 COLSIZES 150,150 ;
聽 聽 聽 AUTOSORT FOOTERS CELL LINES NOBORDER
聽 聽WITH OBJECT oBrw
聽 聽 聽 :nHeadStrAligns 聽 聽 聽:= AL_CENTER
聽 聽 聽 :nHeaderHeight 聽 聽 聽 := 60
聽 聽 聽 :nFooterHeight 聽 聽 聽 := 30
聽 聽 聽 :nRowHeight 聽 聽 聽 聽 聽:= 35
聽 聽 聽 //
聽 聽 聽 :CreateFromCode()
聽 聽END
return oBrw
//
Function FunSort(oBrw,oRcs)
聽 聽 oRcs:Sort:= "nomcli ASC"
聽 聽 //oRcs:Requery()
聽 聽 //No me refresca con .t. y sin .t.
聽 聽oBrw:Refresh(.t.)
聽 聽 Return nil
//
Function filtrar
聽 聽 If !Empty(cbuscar)
聽 聽 聽 聽 oRcs := oConexion:Query("Select CodCli,NomCli From Clientes where nomcli like '%&cbuscar%' Limit 20")
聽 聽 EndIf
聽 聽oBrw:Refresh()
聽 聽return(.t.)#include "fivewin.ch"
#include "xbrowse.ch"
function Main()
聽 聽local oWnd
聽 聽cbuscar=space(20)
聽 聽 oConexion := mysql_Connect( { "localhost", "rovigo", "root", "1223", "3306" } )
聽 聽 If oConexion == nil
聽 聽 聽 聽msginfo("error base de datos")
聽 聽 聽 聽return(.f.)
聽 聽 EndIf
聽 聽 oRcs := oConexion:Query("Select CodCli,NomCli From Clientes Limit 20")
聽 聽 If oRcs==Nil
聽 聽 聽 聽msginfo("error tabla")
聽 聽 Return(.f.)
聽 聽 EndIf
聽 聽DEFINE DIALOG oDlg SIZE 600, 600
聽 聽
聽 聽 聽 聽 聽 聽 oBrw := brow(oWnd,oRcs)
聽 聽 聽 聽 聽 聽 @20,0 get obuscar var cbuscar valid filtrar()
聽 聽ACTIVATE DIALOG oDlg CENTER
return nil
Procedure brow(oWnd,oRcs)
聽local oBrw
聽 聽@ 0,0 XBROWSE oBrw SIZE 200,200 PIXEL OF oWnd ;
聽 聽 聽 DATASOURCE oRcs ;
聽 聽 聽 COLUMNS "codcli", "nomcli" ;
聽 聽 聽 HEADERS "C贸digo", "Nombre" ;
聽 聽 聽 COLSIZES 150,150 ;
聽 聽 聽 AUTOSORT FOOTERS CELL LINES NOBORDER
聽 聽WITH OBJECT oBrw
聽 聽 聽 :nHeadStrAligns 聽 聽 聽:= AL_CENTER
聽 聽 聽 :nHeaderHeight 聽 聽 聽 := 60
聽 聽 聽 :nFooterHeight 聽 聽 聽 := 30
聽 聽 聽 :nRowHeight 聽 聽 聽 聽 聽:= 35
聽 聽 聽 //
聽 聽 聽 :CreateFromCode()
聽 聽END
return oBrw
//
Function FunSort(oBrw,oRcs)
聽 聽 oRcs:Sort:= "nomcli ASC"
聽 聽 //oRcs:Requery()
聽 聽 //No me refresca con .t. y sin .t.
聽 聽oBrw:Refresh(.t.)
聽 聽 Return nil
//
Function filtrar
聽 聽 If !Empty(cbuscar)
聽 聽 聽 聽 oRcs := oConexion:Query("Select CodCli,NomCli From Clientes where nomcli like '%&cbuscar%' Limit 20")
聽 聽 EndIf
聽 聽oBrw:Refresh()
聽 聽return(.t.)Function filtrar
If !Empty(cbuscar)
cbuscar := AllTrim( cbuscar )
oBrw:oDbf := oConexion:Query("Select CodCli,NomCli From Clientes where nomcli like '%&cbuscar%' Limit 20")
EndIf
oBrw:Refresh()
return(.t.)