Error xbrowse

Error xbrowse

Postby JoseLuis » Thu Mar 31, 2022 3:06 pm

Buenas
hablamos de xharbour.
Quiero operar en una MDB, mediante ADORDD y xbrowse.
Tengo el siguiente codigo que funciona bien en versiones anteriores
Code: Select all  Expand view  RUN

function miraregistro()
local base:=Publicas:rMDB+"Registro.mdb"
local oLbx,oDlg
local lSelection := .f.
LOCAL nselectedrow := 0
local cclave:=space(10)
local dato:="Serviruta1"
local comienzo:=dtoc(date())
local ocol
local oDlg1,oSay
DEFINE DIALOG oDlg1 FROM 10, 10 TO 17, 40
    oDlg1:cTitle:="Introducir Clave de Acceso"
    @ 10, 10 Say oSay Prompt "Clave de acceso" OF oDlg1 PIXEL SIZE 50,10
    @ 10, 60  GET cClave OF oDlg1 SIZE 50,10 PIXEL PASSWORD
    @ 30, 50 BTNBMP RESOURCE "go"  SIZE 20,20 OF oDlg1 ACTION (oDlg1:End())
ACTIVATE DIALOG oDlg1 CENTERED
if cclave<>dato
    MsgStop("Error: La contraseña no es valida")
    return nil
endif
msgget("FECHA DEL FICHERO","Normalmente el error es de fecha de hoy ",@comienzo)
set deleted off
Try
        USE &base VIA "ADORDD" alias paquetes NEW TABLE "UltimoRegistro"
CATCH
        Msgstop("No se ha podido establecer conexion con la Base de Datos..","ATENCION")
        Return nil
END
comienzo:=comienzo+' '+"01:00:00"
if paquetes->(Recno())>=1
        DbSetfilter({|| "Ufecha >= '" + comienzo + "'"},"Ufecha >= '" + comienzo + "'")
        PAQUETES->(Dbgotop())
        DEFINE DIALOG oDlg FROM 1, 1 TO 50, 80
                oDlg:ctitle:="PUEDES BORRAR UN REGISTRO PULSANDO LA TECLA SUPR."
            @ 0, 0  XBROWSE oLbx;
                    OF oDlg ;
                        COLUMNS "Sel","Expedicion","Bulto", "UFecha", "UPeso","Uvolumen", "Ulargo" ,"Ualto","Uancho";
                LINES CELL FASTEDIT AUTOSORT FOOTERS ALIAS alias() NOBORDER SIZE -10,-30 PIXEL
                       
                        WITH OBJECT oLbx:aCols[ 1 ]
                                :bEditValue    := { || AScan( oLbx:aSelected, oLbx:BookMark ) > 0 }
                                :SetCheck(nil,.t.)
                                :bFooter       := { || Len( oLbx:aSelected ) }
                            :nFootStrAlign := 1
                        END
etc........
 


Pero en versiones posteriores de fivewin por ejemplo, desde las del año 2015, me lanza el siguiente error, que hace referencia a la linea donde creamos el xbrowse.

//**********************************************
Application
===========
Path and name: C:\COMPILA\FIVEDIT\PROGRAMA\GESPAQN.exe (32 bits)
Size: 6,495,744 bytes
Compiler version: xHarbour 1.2.3 Intl. (SimpLex) (Build 20150603)
FiveWin Version: FWHX 15.10
Windows version: 6.2, Build 9200

Time from start: 0 hours 0 mins 16 secs
Error occurred at: 31/03/22, 14:26:12
Error description: Error BASE/1108 Argument error: AT
Args:
[ 1] = C :
[ 2] = U

Stack Calls
===========
Called from: => AT( 0 )
Called from: .\source\function\FILENAME.PRG => CFILENOPATH( 46 )
Called from: .\source\function\FILENAME.PRG => CFILENOEXT( 66 )
Called from: .\source\classes\XBROWSE.PRG => TXBROWSE:SETRDD( 4206 )
Called from: .\source\classes\XBROWSE.PRG => XBRWSETDATASOURCE( 13443 )
Called from: .\source\classes\XBROWSE.PRG => XBROWSENEW( 13261 )
Called from: c:\compila\fivedit\prg\Funciones.prg => MIRAREGISTRO( 1506 )
Called from: c:\compila\fivedit\prg\Gespaqn.prg => (b)HAZMENU( 576 )
Called from: .\source\classes\MENU.PRG => TMENU:COMMAND( 1053 )
Called from: .\source\classes\WINDOW.PRG => TWINDOW:COMMAND( 1064 )
Called from: .\source\classes\MDIFRAME.PRG => TMDIFRAME:COMMAND( 262 )
Called from: => TMDIFRAME:HANDLEEVENT( 0 )
Called from: .\source\classes\WINDOW.PRG => _FWH( 3602 )
Called from: c:\compila\fivedit\prg\Menu2003.prg => NOGPF( 0 )
Called from: c:\compila\fivedit\prg\Menu2003.prg => WINRUN( 799 )
Called from: .\source\classes\WINDOW.PRG => TMDIFRAME:ACTIVATE( 1020 )
Called from: c:\compila\fivedit\prg\Gespaqn.prg => MAIN( 87 )

//**************************************************************
Creia que venía de la funcion de fivewin Filename.prg, pero he probrado a cambiar y no ha resultado.

Me podeis ayudar a ver a que es debido?
--------------------------
Saludos

Jose Luis
JoseLuis
 
Posts: 426
Joined: Thu Oct 19, 2006 12:28 pm
Location: Toledo

Re: Error xbrowse

Postby nageswaragunupudi » Thu Mar 31, 2022 3:46 pm

Please locate the 3 lines of code in method SetRDD() of xbrowse.prg
Code: Select all  Expand view  RUN
  if Empty( ::cTitle )
      ::cTitle := cFileNoExt( ( ::cAlias )->( DBINFO( DBI_FULLPATH ) ) )
   endif
 


like this
Code: Select all  Expand view  RUN
 
/*
if Empty( ::cTitle )
      ::cTitle := cFileNoExt( ( ::cAlias )->( DBINFO( DBI_FULLPATH ) ) )
endif
*/

 
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10655
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: Error xbrowse

Postby JoseLuis » Thu Mar 31, 2022 4:12 pm

Problema resuelto

Muchas gracias Mr. Rao
--------------------------
Saludos

Jose Luis
JoseLuis
 
Posts: 426
Joined: Thu Oct 19, 2006 12:28 pm
Location: Toledo


Return to FiveWin para Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 42 guests