Page 1 of 1

xbrowse - SQLRDD error

Posted: Fri Sep 27, 2013 4:34 pm
by MGA
FWH1308 R_3:

define dialog oDialog resource 'BROWSEINFOADICIONAIS'

redefine xbrowse oBrowse id 4000 of oDialog datasource 'tabiad'

...

Application
===========
Path and name: C:\BASE\getpdv.exe (32 bits)
Size: ********* bytes
Compiler version: xHarbour build 1.2.1 Intl. (SimpLex) (Rev. 6406)
FiveWin Version: FWHX 13.07
Windows version: 5.1, Build 2600 Service Pack 3

Time from start: 0 hours 0 mins 32 secs
Error occurred at: 27/09/13, 11:30:13
Error description: Error BASE/1066 Argument error: conditional
Args:
[ 1] = U

Stack Calls
===========
Called from: W:\new\fivewin\xbrowse.prg => TXBRWCOLUMN:VALUE( 9223 )
Called from: W:\new\fivewin\xbrowse.prg => TXBRWCOLUMN:ADJUST( 9050 )
Called from: W:\new\fivewin\xbrowse.prg => TXBROWSE:ADJUST( 1063 )
Called from: W:\new\fivewin\xbrowse.prg => TXBROWSE:INITIATE( 957 )
Called from: => __OBJSENDMSG( 0 )
Called from: => HB_EXECFROMARRAY( 0 )
Called from: .\source\function\HARBOUR.PRG => OSEND( 287 )
Called from: => HB_EXECFROMARRAY( 0 )
Called from: .\source\function\HARBOUR.PRG => ASEND( 265 )
Called from: .\source\classes\DIALOG.PRG => TDIALOG:INITIATE( 631 )
Called from: .\source\classes\DIALOG.PRG => TDIALOG:HANDLEEVENT( 876 )
Called from: => DIALOGBOX( 0 )
Called from: .\source\classes\DIALOG.PRG => TDIALOG:ACTIVATE( 274 )
Called from: W:\new\tabelainformacoesadicionaisfwh.prg => BROWSEINFORMACOESADICIONAIS( 35 )
Called from: W:\new\tabelainformacoesadicionais.prg => TABELAINFORMACOESADICIONAIS( 33 )

Re: xbrowse - SQLRDD error

Posted: Fri Sep 27, 2013 4:56 pm
by MGA
here the error:
::oBrw:lReadOnly


and here erro:

static function SetColFromRDD( oCol, uData )

if DBINFO( DBI_ISREADONLY ) .or. oCol:lReadOnly
oCol:bOnPostEdit := { || nil }
else
...

Re: xbrowse - SQLRDD error

Posted: Fri Sep 27, 2013 5:49 pm
by nageswaragunupudi
1. Are you using FWH 13.07 ( as seen in error.log ) or 13.08 R_3 as mentioned in the first line of the posting?

2. Either in 13.07 or 13.08, line numbers 9050 or 9223 do not contain any code that relates to the kind of error shown in the log. ( where nil is used as logical )

3. Are you using modified version of xbrowse? I am asking because the code in the line numbers in the original versions do not correspond to the error.

4.
if DBINFO( DBI_ISREADONLY ) .or. oCol:lReadOnly

There is no chance of oCol:lReadOnly not being logical in the original version of the code.

Re: xbrowse - SQLRDD error

Posted: Fri Sep 27, 2013 7:19 pm
by MGA
nageswaragunupudi,

I use fwh1308 3R with xharbour 1.2.1

1. Are you using FWH 13.07 ( as seen in error.log ) or 13.08 R_3 as mentioned in the first line of the posting?
FWH13.08 3R - for some reason this Fivewin presenting FWH1307 (test behavior FWH\SAMPLES)

2. Either in 13.07 or 13.08, line numbers 9050 or 9223 do not contain any code that relates to the kind of error shown in the log. ( where nil is used as logical )

erro: ( ::cAlias )->( DbInfo( DBI_ISREADONLY ) )
METHOD SetRDD( lAddColumns, lAutoOrder, aFldNames, aRows ) CLASS TXBrowse
...
::lReadOnly := ( ::cAlias )->( DbInfo( DBI_ISREADONLY ) )
...

erro: ::oBrw:lReadOnly
METHOD Value( uNew ) CLASS TXBrwColumn

local uVal

if ! ::oBrw:lReadOnly .and. ! ::lReadOnly .and. ;
...

erro: DBINFO( DBI_ISREADONLY )
static function SetColFromRDD( oCol, uData )
...
if DBINFO( DBI_ISREADONLY ) .or. oCol:lReadOnly
oCol:bOnPostEdit := { || nil }
else
oCol:bOnPostEdit := { |o,x,n| If( n != VK_ESCAPE .and. !eq( o:Value, x, .t., .t. ) .and. o:oBrw:Lock(), ;
o:Value := x, nil ) }
endif
...

3. Are you using modified version of xbrowse? I am asking because the code in the line numbers in the original versions do not correspond to the error.

yes, I had to change some small details

4.
if DBINFO( DBI_ISREADONLY ) .or. oCol:lReadOnly

DBINFO( DBI_ISREADONLY )

There is no chance of oCol:lReadOnly not being logical in the original version of the code.
is DBINFO( DBI_ISREADONLY )

--

the problem seems to be caused by: DBINFO (DBI_ISREADONLY) - remember I am using xHarbour 1.2.1

Re: xbrowse - SQLRDD error

Posted: Sat Sep 28, 2013 12:54 am
by nageswaragunupudi
For my information, please check and let me know this.

After opening the file through SQLRDD
Please insert this line and let me know the result you are getting with your version.

? DBINFO( DBI_READONLY ), VALTYPE( DBINFO( DBI_READONLY )

When I checked with SQLRDD also this is returning a logical value.
I have checked xbrowse 13.08 with SQLRDD also and I and I am not getting any errors.

Please try to use unmodified version of xbrowse and check the results.

Re: xbrowse - SQLRDD error

Posted: Mon Sep 30, 2013 2:36 pm
by MGA
Sr. Nages,

? VALTYPE( DBINFO( DBI_ISREADONLY ))

RETURN: U

Re: xbrowse - SQLRDD error

Posted: Tue Oct 01, 2013 11:02 am
by MGA
UP!

Re: xbrowse - SQLRDD error

Posted: Wed Oct 02, 2013 3:54 am
by nageswaragunupudi
SGS wrote:Sr. Nages,

? VALTYPE( DBINFO( DBI_ISREADONLY ))

RETURN: U

In the present version valtype returns 'L'

In your case, please locate the line

Code: Select all | Expand

  ::lReadOnly    := ( ::cAlias )->( DbInfo( DBI_ISREADONLY ) )
 

in the METHOD SetRdd(...)

Modify this line as

Code: Select all | Expand

  ::lReadOnly    := ( ( ::cAlias )->( DbInfo( DBI_ISREADONLY ) ) == .t. )
 

Re: xbrowse - SQLRDD error

Posted: Wed Oct 02, 2013 11:06 am
by MGA
Sr. Nages,

and here:

static function SetColFromRDD( oCol, uData )

if DBINFO( DBI_ISREADONLY ) .or. oCol:lReadOnly
oCol:bOnPostEdit := { || nil }
else

Re: xbrowse - SQLRDD error

Posted: Wed Oct 02, 2013 12:07 pm
by nageswaragunupudi
Yes

Please change this as:

Code: Select all | Expand

if DBINFO( DBI_ISREADONLY ) == .t. .or. oCol:lReadOnly
 

Re: xbrowse - SQLRDD error

Posted: Wed Oct 02, 2013 4:39 pm
by MGA
thanks :)