Nuevo FWH 16.05
- Antonio Linares
- Site Admin
- Posts: 42653
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Has thanked: 67 times
- Been thanked: 94 times
- Contact:
- karinha
- Posts: 7963
- Joined: Tue Dec 20, 2005 7:36 pm
- Location: São Paulo - Brasil
- Been thanked: 5 times
- Contact:
Re: Nuevo FWH 16.05
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.
Gracias, saludos.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
- cnavarro
- Posts: 6573
- Joined: Wed Feb 15, 2012 8:25 pm
- Location: España
- Has thanked: 4 times
- Been thanked: 6 times
Re: Nuevo FWH 16.05
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á
Ha salido más tarde para incluir en esta versión FwMysql y realizar pruebas
Antonio te lo confirmará
Cristobal Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
- karinha
- Posts: 7963
- Joined: Tue Dec 20, 2005 7:36 pm
- Location: São Paulo - Brasil
- Been thanked: 5 times
- Contact:
Re: Nuevo FWH 16.05
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á
Gracias, master.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
- Antonio Linares
- Site Admin
- Posts: 42653
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Has thanked: 67 times
- Been thanked: 94 times
- Contact:
Re: Nuevo FWH 16.05
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
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
Fivewin 16.11
Harbour 3.2.0
Visual Studio 2015 community
MariaDb/MySql
Ing. MSc. Luis Duque
http://www.accasoft.net
Harbour 3.2.0
Visual Studio 2015 community
MariaDb/MySql
Ing. MSc. Luis Duque
http://www.accasoft.net
- Antonio Linares
- Site Admin
- Posts: 42653
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Has thanked: 67 times
- Been thanked: 94 times
- Contact:
- nageswaragunupudi
- Posts: 10733
- Joined: Sun Nov 19, 2006 5:22 am
- Location: India
- Been thanked: 11 times
- Contact:
Re: Nuevo FWH 16.05
Many thanks for the feedback.
MariaDB/MySql functionality is being continuously improved after the last release. Very soon we shall be publishing updated documentation.
For those users of 16.05 who intend to use or test mysql functionality, we can provide the latest revised libs. Bug-reports will be attended on top priority.
Release version:
a) There is no Open() method.
Suggested: oRs := oCn:RowSet( cSql/TableName )
or oRs := oCn:Query( cSql/TableName ) // alias method
For compatible syntax with FW_OpenRecordSet(), we can also use oRs := mysql_RowSet( oCn, cSql/TableName )
Note: After opening, oRs should be checked against NIL to ascertain success or failure of the call.
b) oRs:Close() Optional but recommended
Latest:
c) oRs:Clone() implemented and is under testing
Release Version:
Saving and Resyncing required primary keys.
Latest:
(a) Unique fields work as good as primary keys
(b) Edit of tables without any primary or unique keys is also implemented and is now possible if all the current record's values together are unique. Resync may have limitations.
Note: While other libs read entire table from the server again after every modification and save, FWH implementation refreshes current record only after save, using ReSync() method. This should make a difference in performance.
Impleneted in the latest version:
DefinedSize, ActualSize, Precision, NumericScale, OriginalValue
Proposed to implement: UnderlyingValue
Now the methods FieldLen(), FieldType(), FieldDec() accept field number or field name.
In addition, FieldName() also accepts fieldname as paramter. This might sound odd but the real purpose is this. The sql statement creating the rowset could have used alias names for the fields, eg: FIRST AS FIRSTNAME, LAST AS LASTNAME, HIREDATE AS JGDATE, etc.
The rowset displays the alias names only eg. FirstName, LastName, JgDate, etc but not the original field names of the original table.
We can query oRs:FieldName( <original-name in the table> ) --> <alias name in the rowset>
Note: Attempting to edit/modify any field values in such Query with aliased field names results in run-time error with other 3rd party libs, but works perfectly with RowSet
Field-lengths:
In the released version, field sizes were reported as provided by the libmysql functions. These match with the other libraries. The confusion with unicode implementation also was handled properly.
Latest Version:
Field sizes are recast to match the corresponding DBF sizes.
Working with us in the release version and also now. We can address the issue if specific examples are provided.
Probable reason might be that you are not using 64 bit dlls with 64 bit exes.
Please copy fwh\dll\libmysql64.dll or libmariadb64.dll to the executable path renaming them as libmysql.dll or libmariadb.dll.
SetCheck()
In case you want to have both bitmaps and prompts then please use:
oCol:SetCheck( aBitmaps, .T., aPrompts )
In your case :
oBrw:aCols[ 1 ]:SetCheck( { "Imagenes\level1.bmp", "Imagenes\level2.bmp" }, .T., { "S", "N" } )
If there is any specific problem with XP, we shall look into.
Note: Please never use bStrData and bOnPostEdit in the application program. These two are deprecated many years back. We are keeping them available only for compatibility of legacy programs.
MariaDB/MySql functionality is being continuously improved after the last release. Very soon we shall be publishing updated documentation.
For those users of 16.05 who intend to use or test mysql functionality, we can provide the latest revised libs. Bug-reports will be attended on top priority.
1) oRcs:Clone(),oRcs:Open() y oRcs:Close()
uso directamente oRcs := oConexion:Query("") trabaja perfecto
Release version:
a) There is no Open() method.
Suggested: oRs := oCn:RowSet( cSql/TableName )
or oRs := oCn:Query( cSql/TableName ) // alias method
For compatible syntax with FW_OpenRecordSet(), we can also use oRs := mysql_RowSet( oCn, cSql/TableName )
Note: After opening, oRs should be checked against NIL to ascertain success or failure of the call.
b) oRs:Close() Optional but recommended
Latest:
c) oRs:Clone() implemented and is under testing
2) oRcs:Update()
uso oRcs:Save() trabaja bien, sin embargo cada tabla debe tener un indice principal
Release Version:
Saving and Resyncing required primary keys.
Latest:
(a) Unique fields work as good as primary keys
(b) Edit of tables without any primary or unique keys is also implemented and is now possible if all the current record's values together are unique. Resync may have limitations.
Note: While other libs read entire table from the server again after every modification and save, FWH implementation refreshes current record only after save, using ReSync() method. This should make a difference in performance.
3) DefinedSize logitud campo, ...........
Impleneted in the latest version:
DefinedSize, ActualSize, Precision, NumericScale, OriginalValue
Proposed to implement: UnderlyingValue
Now the methods FieldLen(), FieldType(), FieldDec() accept field number or field name.
In addition, FieldName() also accepts fieldname as paramter. This might sound odd but the real purpose is this. The sql statement creating the rowset could have used alias names for the fields, eg: FIRST AS FIRSTNAME, LAST AS LASTNAME, HIREDATE AS JGDATE, etc.
The rowset displays the alias names only eg. FirstName, LastName, JgDate, etc but not the original field names of the original table.
We can query oRs:FieldName( <original-name in the table> ) --> <alias name in the rowset>
Note: Attempting to edit/modify any field values in such Query with aliased field names results in run-time error with other 3rd party libs, but works perfectly with RowSet
Field-lengths:
In the released version, field sizes were reported as provided by the libmysql functions. These match with the other libraries. The confusion with unicode implementation also was handled properly.
Latest Version:
Field sizes are recast to match the corresponding DBF sizes.
4) Sort
oRcs:Sort:= cCampo + " ASC"
oRcs:Sort:= cCampo + " DESC"
oRcs:SetOrder( c, u, lDescend )
no sirvió
Working with us in the release version and also now. We can address the issue if specific examples are provided.
NOTA PARA 64
Probable reason might be that you are not using 64 bit dlls with 64 bit exes.
Please copy fwh\dll\libmysql64.dll or libmariadb64.dll to the executable path renaming them as libmysql.dll or libmariadb.dll.
SetCheck()
In case you want to have both bitmaps and prompts then please use:
oCol:SetCheck( aBitmaps, .T., aPrompts )
In your case :
oBrw:aCols[ 1 ]:SetCheck( { "Imagenes\level1.bmp", "Imagenes\level2.bmp" }, .T., { "S", "N" } )
If there is any specific problem with XP, we shall look into.
Note: Please never use bStrData and bOnPostEdit in the application program. These two are deprecated many years back. We are keeping them available only for compatibility of legacy programs.
Regards
G. N. Rao.
Hyderabad, India
G. N. Rao.
Hyderabad, India
Re: Nuevo FWH 16.05
Gracias por las respuestas,
Estoy cambiando todo un Software ERP que está con ADO y ha sido muy fácil el cambio y es totalmente estable, solo unos problemas que se pueden solucionar.
En el xbrowse no he podido refrescarlo cuando se hace un cambio en una tabla.
Ejemplo:
Coloquè el msginfo() para verificar que si està ordenado y si està ordenado pero no me refresca el browse y con filter me pasa lo mismo que si filtra pero no me refresca el xbrowse.
ese es un ejemplo totalmente funcional y lo facil de manejar base de datos y tablas de MySql
Por otro lado logrè resolver el problema de longitud y decimales de la siguiente manera
oRcs:Fields("codcli"):Len
oRcs:Fields("codcli"):Dec
Estoy cambiando todo un Software ERP que está con ADO y ha sido muy fácil el cambio y es totalmente estable, solo unos problemas que se pueden solucionar.
En el xbrowse no he podido refrescarlo cuando se hace un cambio en una tabla.
Ejemplo:
Code: Select all | Expand
#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 nil
Coloquè el msginfo() para verificar que si està ordenado y si està ordenado pero no me refresca el browse y con filter me pasa lo mismo que si filtra pero no me refresca el xbrowse.
ese es un ejemplo totalmente funcional y lo facil de manejar base de datos y tablas de MySql
Por otro lado logrè resolver el problema de longitud y decimales de la siguiente manera
oRcs:Fields("codcli"):Len
oRcs:Fields("codcli"):Dec
Fivewin 16.11
Harbour 3.2.0
Visual Studio 2015 community
MariaDb/MySql
Ing. MSc. Luis Duque
http://www.accasoft.net
Harbour 3.2.0
Visual Studio 2015 community
MariaDb/MySql
Ing. MSc. Luis Duque
http://www.accasoft.net
- nageswaragunupudi
- Posts: 10733
- Joined: Sun Nov 19, 2006 5:22 am
- Location: India
- Been thanked: 11 times
- Contact:
Re: Nuevo FWH 16.05
Please do not use the above syntax for creating xbrowse. This is obsolete and does not allow you to take advantage of the many built-in features of xbrowse. Recommended to use command syntax.
This is our recommended way to create the above browse:
1. Using AUTOSORT clause in XBrowse command:
This allows clicking on header to automatically sort columns. Second click on the same column toggles asc and desc order
2. The same code works for ADO RecordSet, TMySql or Dolphin Query and DBF also without changing even a single alphabet. (For dbf, oRcs should be the alias name)
3. Please consider having one primary key for every table and include that field in the queries always. Hope codcli is the primary key in this case.
This is our recommended way to create the above browse:
Code: Select all | Expand
function 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
1. Using AUTOSORT clause in XBrowse command:
This allows clicking on header to automatically sort columns. Second click on the same column toggles asc and desc order
2. The same code works for ADO RecordSet, TMySql or Dolphin Query and DBF also without changing even a single alphabet. (For dbf, oRcs should be the alias name)
3. Please consider having one primary key for every table and include that field in the queries always. Hope codcli is the primary key in this case.
Regards
G. N. Rao.
Hyderabad, India
G. N. Rao.
Hyderabad, India
Re: Nuevo FWH 16.05
Gracias
voy a tomar en cuenta las sugerencias para xbrowse, pero lo que estoy colocando es solo para explicar lo que necesito.
AUTOSORT lo hace bien pero necesito que siempre se posicione en el primer registro sea ascendente o descendente.
mas eso necesito que cuando escriba en un get cualquier palabra se haga una nueva consulta o un filtros, pero vamos a suponer una consulta con el fin de mostrar
otra información, insisto necesito refrescar el browse con la consulta nueva, con ado se hace bien solo con oBrw:Refresh()
voy a tomar en cuenta las sugerencias para xbrowse, pero lo que estoy colocando es solo para explicar lo que necesito.
AUTOSORT lo hace bien pero necesito que siempre se posicione en el primer registro sea ascendente o descendente.
mas eso necesito que cuando escriba en un get cualquier palabra se haga una nueva consulta o un filtros, pero vamos a suponer una consulta con el fin de mostrar
otra información, insisto necesito refrescar el browse con la consulta nueva, con ado se hace bien solo con oBrw:Refresh()
Code: Select all | Expand
#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.)
Fivewin 16.11
Harbour 3.2.0
Visual Studio 2015 community
MariaDb/MySql
Ing. MSc. Luis Duque
http://www.accasoft.net
Harbour 3.2.0
Visual Studio 2015 community
MariaDb/MySql
Ing. MSc. Luis Duque
http://www.accasoft.net
Re: Nuevo FWH 16.05
Maestro Antonio
Alguna solución para que se refresque el xbrowse con la nueva clase tymsql
Refrescar desde el punto de vista que por algun motivo se hace una nueva consulta, un filtro un order.
Cabe destacar que con ado solo con oBrw:Refresh() lo hace y refrescando el oRcs:Refresh()
repito ejemplo
Alguna solución para que se refresque el xbrowse con la nueva clase tymsql
Refrescar desde el punto de vista que por algun motivo se hace una nueva consulta, un filtro un order.
Cabe destacar que con ado solo con oBrw:Refresh() lo hace y refrescando el oRcs:Refresh()
repito ejemplo
Code: Select all | Expand
#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.)
Fivewin 16.11
Harbour 3.2.0
Visual Studio 2015 community
MariaDb/MySql
Ing. MSc. Luis Duque
http://www.accasoft.net
Harbour 3.2.0
Visual Studio 2015 community
MariaDb/MySql
Ing. MSc. Luis Duque
http://www.accasoft.net
- nageswaragunupudi
- Posts: 10733
- Joined: Sun Nov 19, 2006 5:22 am
- Location: India
- Been thanked: 11 times
- Contact:
Re: Nuevo FWH 16.05
Code: Select all | Expand
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.)
Regards
G. N. Rao.
Hyderabad, India
G. N. Rao.
Hyderabad, India