xbrowse ERROR ADS (Dynamic descend not supported) RESUELTO

xbrowse ERROR ADS (Dynamic descend not supported) RESUELTO

Postby Patricio Avalos Aguirre » Wed Oct 10, 2012 1:17 pm

Estimados,

la clase xbrowse produce este error la presionar la columna 2 veces para ordenar

Time from start: 0 hours 0 mins 11 secs
Error occurred at: 10-10-2012, 10:13:06
Error description: Error DBCMD/1034 Dynamic descend not supported in this version: ORDDESCEND

Stack Calls
===========
Called from: => ORDDESCEND( 0 )
Called from: c:\fwh\source\classes\xbrowse.prg => TXBRWCOLUMN:SETORDER( 11353 )
Called from: c:\fwh\source\classes\xbrowse.prg => TXBRWCOLUMN:HEADERLBUTTONUP( 10186 )
Called from: c:\fwh\source\classes\xbrowse.prg => TXBROWSE:LBUTTONUP( 3303 )
Called from: c:\fwh\source\classes\CONTROL.prg => TCONTROL:HANDLEEVENT( 1691 )
Called from: c:\fwh\source\classes\xbrowse.prg => TXBROWSE:HANDLEEVENT( 11633 )
Called from: c:\fwh\source\classes\WINDOW.prg => _FWH( 3152 )


adjunto un ejemplo sacado de xbrwAdt.prg
Code: Select all  Expand view

#include "fivewin.ch"
#include "ads.ch"
#include "xbrowse.ch"
#include "richedit.ch"
//----------------------------------------------------------------------------//
field CAMPO1, CAMPO2

function Main()

   local oWnd, oFont, aRddList, i

   SET DATE ITALIAN
   SET CENTURY ON
   SET EXCLUSIVE OFF


   RddRegister( "ADS", 1 )
   AdsSetServerType( ADS_LOCAL_SERVER )
   if AScan( aRddList := RddList(), 'ADT' ) > 0
      RDDSetDefault( 'ADT' )
   elseif AScan( aRddList, 'ADSADT' ) > 0
      RDDSetDefault( 'ADSADT' )
   else
      MsgInfo( 'RDD ADT not linked' )
   endif

    if !file( "flds1.adt" )
        dbcreate( "flds1", {{ "campo1", "C", 15,0 },;
                                 { "campo2", "N", 10,0 },;
                                 { "campo3", "D", 08,0 },;
                                 { "campo4", "C", 15,0 },;
                                 { "fmemo", "M", 10, 0}                              } )

    USE FLDS1 exclusive
        index on campo1 tag campo1
        index on campo4 tag campo4

        for i := 1 TO 10
            dbAppend()
            field->campo1 := ltrim(str(i)) + " indice.."
            field->campo2 := i
            field->campo3 := date()+i
            field->campo4 := ltrim(str(11-i)) + " indice.."
            field->fmemo := "indice numero "+ltrim(str(i) )
        next i
        dbcommitall()
        dbCloseAll()
    endif

    USE FLDS1

   GO TOP

   DEFINE FONT oFont NAME "TAHOMA" SIZE 0,-12
   DEFINE WINDOW oWnd MDI TITLE "Xbrowse with ADT" ;
      MENU MakeMenu()
   oWnd:SetFont( oFont )

   ACTIVATE WINDOW oWnd ON RIGHT CLICK xbrowse( ownd )
   RELEASE FONT oFont

return nil

//----------------------------------------------------------------------------//

static function MakeMenu

   local oMenu

   MENU oMenu 2007
      MENUITEM "ADT"
      MENU
         MENUITEM "Data" ACTION xbrData()
         MENUITEM "Structure" ACTION xBrStruct()
         SEPARATOR
         MENUITEM "e&Xit" ACTION WndMain():End()
      ENDMENU
      oMenu:AddMdi()
   ENDMENU

return oMenu

//----------------------------------------------------------------------------//

static function xbrStruct

   local aStruct  := dbStruct()
   local oWnd, oBrw, n

xbrowse( astruct )

   for n := 1 to len( astruct )
      asize( astruct[ n ], 6 )
      astruct[ n ][ 6 ] := ValType( FieldGet( n ) )
   next

   DEFINE WINDOW oWnd MDICHILD OF WndMain() TITLE 'Structure'

   @ 0,0 XBROWSE oBrw ;
      HEADERS "Name", "Type", "Len", "Dec", "Ext", "Read" ;
      OF ownd ;
      ARRAY aStruct ;
      AUTOCOLS CELL LINES

   oBrw:CreateFromCode()
   oWnd:oClient := oBrw

   ACTIVATE WINDOW oWnd ON INIT oBrw:SetFocus()

return nil

//----------------------------------------------------------------------------//
static function xbrData

   local oWnd, oBrw
   local c
   DEFINE WINDOW oWnd MDICHILD OF WndMain()

   @ 0,0 XBROWSE oBrw;
      OF oWnd ;
      ALIAS Alias() ;
      AUTOCOLS CELL LINES

    WITH OBJECT oBrw
        :nStretchCol := STRETCHCOL_WIDEST
       :nColDividerStyle := LINESTYLE_RAISED
       :nRowDividerStyle := LINESTYLE_RAISED
        :nMarqueeStyle    := MARQSTYLE_HIGHLROW

        :LAllowColSwapping   := .f.
        :lColDividerComplete := .f.
        :lAllowRowSizing := .f.
        :lAllowColHiding := .f.
        :lKineticBrw := .f.
        :nRowHeight  := 24
        :nHeaderHeight := 22

        :aCols[1]:cSortOrder := "campo1"
        :aCols[4]:cSortOrder := "campo4"
        :lRecordSelector := .f.
    END

   WITH OBJECT oBrw:fmemo
      :nEditType     := EDIT_GET
      :bLDClickData  := { |r,c,f,o| c:= flds->fmemo, MemoEdit( @c ), flds->fmemo := c }
   END

   oBrw:CreateFromCode()
   oWnd:oClient := oBrw

   ACTIVATE WINDOW oWnd ON INIT oBrw:SetFocus()

return nil

//----------------------------------------------------------------------------//

function Rtf2text( cRtf )

   local oWnd, hDll, oRich
   local cText

   if cRtf != nil
      hDll := LoadLibrary( 'riched20.dll' )
      DEFINE WINDOW oWnd
      @ 0,0 RICHEDIT oRich VAR cRtf OF oWnd PIXEL SIZE 50,50
      cText    := oRich:GetText()
      ACTIVATE WINDOW oWnd HIDDEN ON INIT oWnd:End()
      FreeLibrary( hDll )
   endif

return cText

//------------------------------------------------------------------//

external hb_decode
 
Last edited by Patricio Avalos Aguirre on Thu Oct 11, 2012 1:02 pm, edited 2 times in total.
Saludos
Patricio

__________________________________________________________________
Version: Harbour 3.2.0dev (r1307082134),Compiler: Borland C++ 5.8.2 (32-bit)
PCode version: 0.3, FWH 13.2
http://www.sialm.cl
User avatar
Patricio Avalos Aguirre
 
Posts: 1059
Joined: Fri Oct 07, 2005 1:56 pm
Location: La Serena, Chile

Re: xBrowse ERROR con ADS (Dynamic descend not supported)

Postby Patricio Avalos Aguirre » Wed Oct 10, 2012 2:43 pm

Este puede ser la solucion

Code: Select all  Expand view
METHOD SetOrder() CLASS TXBrwColumn
..
..

   elseif ValType( ::oBrw:cAlias ) == 'C' .and. ValType( ::cSortOrder ) == 'C'
   DEFAULT cOrdBag := ( ::oBrw:cAlias )->( OrdBagName() )

    if (::oBrw:cAlias)->( OrdSetFocus() ) == Upper( ::cSortOrder ) .and.;
                   !("ADS"$( ::oBrw:cAlias )->( RddName() ) .or. 'ADT' $ ( ::oBrw:cAlias )->( RddName() )) // esta linea he puesto
 
Saludos
Patricio

__________________________________________________________________
Version: Harbour 3.2.0dev (r1307082134),Compiler: Borland C++ 5.8.2 (32-bit)
PCode version: 0.3, FWH 13.2
http://www.sialm.cl
User avatar
Patricio Avalos Aguirre
 
Posts: 1059
Joined: Fri Oct 07, 2005 1:56 pm
Location: La Serena, Chile

Re: xBrowse ERROR con ADS (Dynamic descend not supported)

Postby RSalazarU » Thu Oct 11, 2012 12:49 am

Hola Patricio:

El problema debe ser otro, ya que a mi me funciona bien.

Creo que es problema es de version, yo uso la ver. 9.xx

Hace tiempo usaba la version 7.x y tenia problemas como ese, no lo recuerdo bien.

El error DBCMD/1034 no parece ser de ADS. Para mayor detalle fijate en la info de la tabla, en la mia aparece Rddname: ADSCDX.

Atentamente,

Rolando.
Cochabamba, Bolivia.
RSalazarU
 
Posts: 211
Joined: Wed Jul 16, 2008 12:59 pm
Location: Cochabamba-Bolivia

Re: xBrowse ERROR con ADS (Dynamic descend not supported)

Postby Patricio Avalos Aguirre » Thu Oct 11, 2012 12:54 am

Hola Rolando

Puedes reproducir el ejemplo que he puesto arriba, puede que este haciendo algo mal.

ahora yo utilizo ads v10 modo local
Saludos
Patricio

__________________________________________________________________
Version: Harbour 3.2.0dev (r1307082134),Compiler: Borland C++ 5.8.2 (32-bit)
PCode version: 0.3, FWH 13.2
http://www.sialm.cl
User avatar
Patricio Avalos Aguirre
 
Posts: 1059
Joined: Fri Oct 07, 2005 1:56 pm
Location: La Serena, Chile

Re: xBrowse ERROR con ADS (Dynamic descend not supported)

Postby sysctrl2 » Thu Oct 11, 2012 1:41 am

Patricio,

compilado con buildx.bat de \fwh\samples

sin cambiar ningun pelito de codigo,

funciona correctamente: https://www.box.com/s/268kylkq0xtmn4keumzo

xhb 1.2.1 oct 2012

saludos..

Cesar SysCtrl Soft.
Cesar Cortes Cruz
SysCtrl Software
Mexico

' Sin +- FWH es mejor "
User avatar
sysctrl2
 
Posts: 971
Joined: Mon Feb 05, 2007 7:15 pm

Re: xBrowse ERROR con ADS (Dynamic descend not supported)

Postby Patricio Avalos Aguirre » Thu Oct 11, 2012 1:01 pm

Gracias a todos

el problema era la libreria rddads.lib que tenia, ahora compile la nueva bajada del svn
Saludos
Patricio

__________________________________________________________________
Version: Harbour 3.2.0dev (r1307082134),Compiler: Borland C++ 5.8.2 (32-bit)
PCode version: 0.3, FWH 13.2
http://www.sialm.cl
User avatar
Patricio Avalos Aguirre
 
Posts: 1059
Joined: Fri Oct 07, 2005 1:56 pm
Location: La Serena, Chile


Return to FiveWin para Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 48 guests