Page 1 of 1

ERROR function FW_ShowAdoError()

PostPosted: Thu Sep 07, 2023 11:02 am
by Jimmy
hi,

i got a Error
FiveWin version: FWH 23.04
C compiler version: Microsoft Visual C 19.32.31332 (64-bit)
Windows 10 64 Bits, version: 10.0, Build 19045

Error description: Error BASE/1004 Keine exportierte Methode: ERRORS
Args:
[ 1] = U

Stack Calls
===========
Called from: => ERRORS( 0 )
Called from: .\source\function\ADOFUNCS.PRG => FW_SHOWADOERROR( 0 )
Called from: .\source\function\ADOFUNCS.PRG => FW_ADOTABLEEXISTS( 0 )
Called from: .\source\function\ADOFUNCS.PRG => FW_ADOINDEXES( 0 )

Code: Select all  Expand view

function FW_ShowAdoError( oCn, lSilent )

   local nErr, oErr, cErr

   DEFAULT oCn := soCn, lSilent := .f.

   if ( nErr := oCn:Errors:Count ) > 0
      oErr  := oCn:Errors( nErr - 1 )
      if ! lSilent

IMHO it must be "oCn:Error" without "s"

Re: ERROR function FW_ShowAdoError()

PostPosted: Thu Sep 07, 2023 11:28 am
by nageswaragunupudi
IMHO it must be "oCn:Error" without "s"

Ofcourse, NO. Errors is correct

If you read the error log again, you will see that the error is becase oCn is NIL.

That means in the function call FW_ADOINDEXES( oCn, cTable ), oCn must have been NIL.

Re: ERROR function FW_ShowAdoError()

PostPosted: Thu Sep 07, 2023 11:52 am
by Jimmy
hi,
nageswaragunupudi wrote:Ofcourse, NO. Errors is correct

If you read the error log again, you will see that the error is becase oCn is NIL.

That means in the function call FW_ADOINDEXES( oCn, cTable ), oCn must have been NIL.

Ok you are right, sorry