xBrowse error on ADS (SOLVED!)

xBrowse error on ADS (SOLVED!)

Postby ryugarai27 » Fri Aug 31, 2018 9:17 am

Hi Fivewin experts,

I encountered an error using xBrowse with ADS and I am unable to find any solution, hope someone could help me solve the issue. I am having this error:

Error occurred at: 08/31/2018, 17:00:05
Error description: Error BASE/1004 Class: 'NUMERIC' has no exported method: LDRAG
Args:
[ 1] = N -12

Stack Calls
===========
Called from: => LDRAG( 0 )
Called from: .\source\classes\XBROWSE.PRG => (b)TXBROWSE:SETRDD( 4959 )
Called from: .\source\classes\XBROWSE.PRG => (b)TXBROWSE:TXBROWSE( 503 )
Called from: => TXBROWSE:SKIP( 0 )
Called from: .\source\classes\XBROWSE.PRG => TXBROWSE:CALCROWSELPOS( 1697 )
Called from: .\source\classes\XBROWSE.PRG => TXBROWSE:REFRESH( 1664 )
Called from: .\source\classes\XBROWSE.PRG => (b)TXBROWSE:TXBROWSE( 535 )
Called from: => TXBROWSE:RESIZE( 0 )
Called from: => TWINDOW:HANDLEEVENT( 0 )
Called from: .\source\classes\CONTROL.PRG => TCONTROL:HANDLEEVENT( 1731 )
Called from: .\source\classes\XBROWSE.PRG => TXBROWSE:HANDLEEVENT( 14651 )
Called from: .\source\classes\WINDOW.PRG => _FWH( 3337 )
Called from: => WNDWIDTH( 0 )
Called from: .\source\classes\CONTROL.PRG => (b)TCONTROL:TCONTROL( 179 )
Called from: => TXBROWSE:_NWIDTH( 0 )
Called from: .\source\classes\XBROWSE.PRG => TXBROWSE:BRWFITSIZE( 1264 )
Called from: .\source\function\XBROWSER.PRG => FITSIZES( 302 )
Called from: .\source\function\XBROWSER.PRG => (b)XBROWSE( 272 )
Called from: .\source\classes\DIALOG.PRG => TDIALOG:INITIATE( 714 )
Called from: .\source\classes\DIALOG.PRG => TDIALOG:HANDLEEVENT( 906 )
Called from: => DIALOGBOXINDIRECT( 0 )
Called from: .\source\classes\DIALOG.PRG => TDIALOG:ACTIVATE( 296 )
Called from: .\source\function\XBROWSER.PRG => XBROWSE( 272 )
Called from: Source\mainapp.prg => BUILDDIALOG( 184 )
Called from: Source\mainapp.prg => (b)MAINAPP:BROWSEMASTER( 169 )
Called from: .\source\classes\WINDOW.PRG => TWINDOW:ACTIVATE( 1023 )
Called from: .\source\classes\MDICHILD.PRG => TMDICHILD:ACTIVATE( 262 )
Called from: Source\mainapp.prg => MAINAPP:BROWSEMASTER( 169 )
Called from: Source\mainapp.prg => (b)MAINAPP:NEW( 35 )
Called from: .\source\classes\BTNBMP.PRG => TBTNBMP:CLICK( 683 )
Called from: .\source\classes\BTNBMP.PRG => TBTNBMP:LBUTTONUP( 919 )
Called from: .\source\classes\CONTROL.PRG => TCONTROL:HANDLEEVENT( 1721 )
Called from: .\source\classes\BTNBMP.PRG => TBTNBMP:HANDLEEVENT( 1868 )
Called from: .\source\classes\WINDOW.PRG => _FWH( 3337 )
Called from: => WINRUN( 0 )
Called from: .\source\classes\WINDOW.PRG => TMDIFRAME:ACTIVATE( 1037 )
Called from: Source\mainapp.prg => MAINAPP:ACTIVATE( 78 )
Called from: Source\main.prg => MAIN( 20 )

Image

link to screenshot image: https://file.io/tue77U

This happened when issuing the command:
cAlias := oConn:aAlias[MasterDB]
DBSelectArea( cAlias )
xBrowse( cAlias )

I can confirm that the table is not empty by using the lastrec() function, I tested xbrowse using arrays and it seems to work fine. I am using FWH1706 + xHarbour 1.2.3 (Simplex) (Build 20161218) + bcc 7.0

Thanks a lot and more power!

ryugarai27
Last edited by ryugarai27 on Sun Sep 16, 2018 4:13 am, edited 1 time in total.
User avatar
ryugarai27
 
Posts: 65
Joined: Fri Feb 13, 2009 12:03 pm
Location: Manila, Philippines

Re: xBrowse error on ADS

Postby nageswaragunupudi » Fri Aug 31, 2018 11:08 am

Please let us know the FWH version you are using.

Please also let us know if you are using a modified xbrowse.prg, because the line numbers in the error.log are not matching with the xbrowse source.
Regards

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

Re: xBrowse error on ADS

Postby ryugarai27 » Fri Aug 31, 2018 1:48 pm

Hi Nages,

I am using FWH1706 + xHarbour 1.2.3 Intl. (Simplex) (Build 20161218) + bcc 7.0, I have not modified the original xbrowse.prg that comes with the package source. Here is the link to the xbrowse.prg source file:

https://drive.google.com/open?id=1UQIY8msFCB4dspylDXrgCDbL-eggii6f

Best regards,
ryugarai27
User avatar
ryugarai27
 
Posts: 65
Joined: Fri Feb 13, 2009 12:03 pm
Location: Manila, Philippines

Re: xBrowse error on ADS

Postby nageswaragunupudi » Fri Aug 31, 2018 1:58 pm

Thanks.
I will check with 17.06 sources.
One more clarification please. Do you face this problem with all ADS tables and not with DBFCDX tables? Or only occasionally?
Regards

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

Re: xBrowse error on ADS

Postby fraxzi » Sat Sep 01, 2018 12:25 am

Hi Roderick,

Call me at the office. :wink: :wink: :wink:

Thanks,
Frances
Kind Regards,
Frances

Fivewin for xHarbour v18.07
xHarbour v1.2.3.x
BCC 7.3 + PellesC8 ( Resource Compiler only)
ADS 10.1 / MariaDB
Crystal Reports 8.5/9.23 DE
xMate v1.15
User avatar
fraxzi
 
Posts: 811
Joined: Tue May 06, 2008 4:28 am
Location: Philippines

Re: xBrowse error on ADS

Postby ryugarai27 » Sat Sep 01, 2018 5:01 am

Hi Nages,

This error occurs only using ADS, I have tested the following code and they worked fine:

#include "FiveWin.Ch"
#include "XBrowse.Ch"

REQUEST DBFCDX

function Main()
use customer alias "cust"
xBrowse("cust")

return (nil)

Hi Frances,

I sent you an email on vichezzz.


Thanks,
ryugarai27
User avatar
ryugarai27
 
Posts: 65
Joined: Fri Feb 13, 2009 12:03 pm
Location: Manila, Philippines

Re: xBrowse error on ADS

Postby ryugarai27 » Sat Sep 01, 2018 5:32 am

Hi Nages,

The following code works perfectly on FWH901 (xHarbour build 1.1.0 Intl. (SimpLex) (Rev. 6195) + Borland C++ 5.5.1 (32 bit) ) which uses the Aces32_81.lib and rddads81.lib.

#include "ads.ch"
#include "fivewin.ch"

REQUEST ADS
static hAds, oConn, lOk

function main()
local cPath := "D:\projects\fwh1706\pos6\LocalDB\POS.add"

lOk := .F.
RddRegister("ads",1)
RddSetDefault("Ads")
AdsSetServerType ( 1 ) // local
lOk = ADSConnect60( cPath, 1, "", "",,@hAds)
IF lOk
dbUseArea(.T., "ADS", "MASTER", "_master", .T., .F.)
xBrowse("_master")
ELSE
MsgStop(" Error connecting to tables " )
END

AdsDisconnect( hAds )

return (nil )

But when I tried to compile the source on FWH1706, it compiles without errors but launching the programs produces an error:

Time from start: 0 hours 0 mins 0 secs
Error occurred at: 09/01/18, 13:26:36
Error description: Error BASE/1001 Undefined function: ADSKEYNO
Args:
[ 1] = U
[ 2] = U
[ 3] = N 1

Stack Calls
===========
Called from: => ADSKEYNO( 0 )
Called from: .\source\classes\XBROWSE.PRG => (b)TXBROWSE:SETRDD( 4982 )
Called from: .\source\classes\XBROWSE.PRG => (b)TXBROWSE:TXBROWSE( 501 )
Called from: => TXBROWSE:KEYNO( 0 )
Called from: .\source\classes\XBROWSE.PRG => (b)TXBROWSE:TXBROWSE( 602 )
Called from: => TXBROWSE:VUPDATEPOS( 0 )
Called from: .\source\classes\XBROWSE.PRG => (b)TXBROWSE:TXBROWSE( 497 )
Called from: => TXBROWSE:KEYCOUNT( 0 )
Called from: .\source\classes\XBROWSE.PRG => TXBROWSE:ADJUST( 1426 )
Called from: .\source\classes\XBROWSE.PRG => TXBROWSE:INITIATE( 1186 )
Called from: => __OBJSENDMSG( 0 )
Called from: => HB_EXECFROMARRAY( 0 )
Called from: .\source\function\HARBOUR.PRG => OSEND( 300 )
Called from: => HB_EXECFROMARRAY( 0 )
Called from: .\source\function\HARBOUR.PRG => ASEND( 278 )
Called from: .\source\classes\DIALOG.PRG => TDIALOG:INITIATE( 655 )
Called from: .\source\classes\DIALOG.PRG => TDIALOG:HANDLEEVENT( 906 )
Called from: => DIALOGBOXINDIRECT( 0 )
Called from: .\source\classes\DIALOG.PRG => TDIALOG:ACTIVATE( 296 )
Called from: .\source\function\XBROWSER.PRG => XBROWSE( 272 )
Called from: Source\main.prg => MAIN( 17 )

I linked the ADS libraray that comes with the package on xharbour_bcc7\lib, files ace32.lib and rddads.lib. Could this be a problem in the ads library? Can I have an ads libraray compatible with FWH1706?

Thanks much and more power!
ryugarai27
User avatar
ryugarai27
 
Posts: 65
Joined: Fri Feb 13, 2009 12:03 pm
Location: Manila, Philippines

Re: xBrowse error on ADS

Postby ryugarai27 » Sat Sep 01, 2018 6:05 am

Hi Nages,

I have removed the ADSKEYNO error by adding the following EXTERN commands:
EXTERN ADSKeyNo
EXTERN ADSKeyCount
EXTERN ADSSetRelKeyPos
EXTERN ADSGetRelKeyPos

but still the error on xbrowse:ldrag persists.

Best regards,
ryugarai27
User avatar
ryugarai27
 
Posts: 65
Joined: Fri Feb 13, 2009 12:03 pm
Location: Manila, Philippines

Re: xBrowse error on ADS

Postby ryugarai27 » Sat Sep 08, 2018 10:32 am

Hi Rao,

Did you manage to check this error?

I have tested the following code on FWH9.01 and it is working fine, but when compiled on FWH1706 the error still persists:

#include "ads.ch"
#include "fivewin.ch"

REQUEST ADS
static hAds, oConn, lOk

function main()
local cPath := "D:\projects\fwh1706\pos6\LocalDB\POS4.add"

EXTERN ADSKeyNo
EXTERN ADSKeyCount
EXTERN ADSSetRelKeyPos
EXTERN ADSGetRelKeyPos

AdsSetFileType( ADS_ADT )

lOk := .F.
RddRegister("Ads", 1)
RddSetDefault("Ads")
AdsSetServerType ( 1 ) // local
lOk = ADSConnect60( cPath, 1, "AdsSys", "",,@hAds)
IF lOk
dbUseArea(.T., "ADS", "MASTER", "_master", .T., .F.)
xBrowse("_master")
ELSE
MsgStop(" Error connecting to tables " )
END

DBCloseAll()
AdsDisconnect( hAds )

return (nil )

Best regards,
ryugarai27
User avatar
ryugarai27
 
Posts: 65
Joined: Fri Feb 13, 2009 12:03 pm
Location: Manila, Philippines

Re: xBrowse error on ADS

Postby nageswaragunupudi » Sun Sep 09, 2018 3:01 pm

Can you please send to my email your copies of

1. ace32.dll
2. adsloc32.dll
3. rddads.lib ( harbour if you are using harbour)
4. ace32.dll

and one free ADT (with adm if necessary) file ( not dictionary bound)

Please send me through https://wetransfer.com/

my email
nageswaragunupudi [at] gmail [dot] com

Note: For version 17.06, two revised builds were published. Hope you downloaded the latest build.
Regards

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

Re: xBrowse error on ADS

Postby nageswaragunupudi » Mon Sep 10, 2018 9:53 am

I am unable to understand why are you getting the error.
I am able to browse ADT files with FWH 17.06. This is the test program I tried, which includes simple XBROWSER also.

Code: Select all  Expand view
#include "fivewin.ch"
#include "ads.ch"
#include "xbrowse.ch"
#include "richedit.ch"

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

function Main()

   local oWnd, oFont, aRddList

   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


   USE FLDS
   GO TOP

   XBROWSER "FLDS" TITLE FWVERSION + " : FLDS.ADT"

   DEFINE FONT oFont NAME "TAHOMA" SIZE 0,-12
   DEFINE WINDOW oWnd MDI TITLE FWVERSION + " : 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: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

//----------------------------------------------------------------------------//
EXTERNAL ADSKEYNO
 


Image

Image
Regards

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

Re: xBrowse error on ADS

Postby ryugarai27 » Fri Sep 14, 2018 7:24 am

Hi Rao,

Seems that my FWH 1706 version is not stable, I tried your example and still the error persists. If you could, please send me the link where I can download the stable version of FWH1706.

Many thanks,
ryugarai27
User avatar
ryugarai27
 
Posts: 65
Joined: Fri Feb 13, 2009 12:03 pm
Location: Manila, Philippines

Re: xBrowse error on ADS SOLVED!

Postby ryugarai27 » Sun Sep 16, 2018 4:11 am

Hi Rao,

Thanks so much for your help! It is working fine now.

Best regards,
ryugarai27
User avatar
ryugarai27
 
Posts: 65
Joined: Fri Feb 13, 2009 12:03 pm
Location: Manila, Philippines


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 47 guests