Now I have a Little problem with xBrowse, I have this code
Ahora tengo un pequeño problema con un xBrowse,en el siguiente código:
- Code: Select all Expand view RUN
// I create a table
// Creamos la tabla
cCmdSql := "CREATE TABLE IF NOT EXISTS Cuentas (" +;
"CUE_CUE DECIMAL(10,0) NOT NULL DEFAULT 0 COMMENT 'Número de cuenta'," +;
"CUE_DES CHAR(35) NOT NULL DEFAULT '' COMMENT 'Nombre o descripción del banco'," +;
"PRIMARY KEY(CUE_CUE))" +;
"ENGINE = InnoDB COMMENT 'Cuentas bancarias';"
…….
…….
……
// I show the recordset in this xBrowse
// Muestro el recordset en el xBrowse
REDEFINE XBROWSE oBrw ID 200 OF oDlg;
DATASOURCE oRsCta ;
COLUMNS "CUE_DES", "CUE_CUE" ;
HEADERS "Descripción", "Número";
COLSIZES 150,50 ;
FOOTERS AUTOSORT
FWNumFormat( "A", (.T.) )
WITH OBJECT oBrw
:l2007 := (.F.)
:lHScroll := (.F.)
:lVScroll := (.F.)
:nMarqueeStyle := MARQSTYLE_HIGHLROW
:nColDividerStyle := LINESTYLE_LIGHTGRAY
:nRowDividerStyle := LINESTYLE_LIGHTGRAY
:nStretchCol := STRETCHCOL_WIDEST
:nHeaderHeight := 25
:nRowHeight := 22
:nFooterHeight := 25
:bClrHeader := { || {CLR_WHITE,CLR_BLACK} }
:bClrFooter := { || {CLR_WHITE,CLR_BLACK} }
:bClrSel := { || IF( oBrw:KeyNo % oApp:nRowsInt == 0 ,{ CLR_BLACK, oApp:nRowParClr },{ CLR_BLACK, oApp:nRowNonClr }) }
:bClrSelFocus := { || {oApp:nFClrFocus,oApp:nBClrFocus} }
:bClrStd := { || IF( oBrw:KeyNo % oApp:nRowsInt == 0 ,{ CLR_BLACK, oApp:nRowParClr },{ CLR_BLACK, oApp:nRowNonClr }) }
:nRecSelColor := oApp:nRowParClr
:lDisplayZeros := (.F.) // zero values are not displayed. Added by GNRao. No need to use @Z
WITH OBJECT :aCols[01]
:cOrder := "A"
END
END
I create an empty table, the first time I can add records without problems. the next time I re open the application to add more récords
I get the error below listed
Se crea la tabla vacia, la primera vez puedo agregar el recordset sin problemas, la siguiente vez que abro la aplicación con la
intención de agregar mas registros, me tira el error abajo listado.
But if I define the first field of the table (CUE_CUE) as CHAR instead of DECIMAL there is no error, could you help me?, please.
He detectado que si defino el campo CUE_CUE de tipo CHAR en lugar de DECIMAL, no me tira el error.
This is the error message:
Este es el mensaje del error
- Application
===========
Path and name: C:\AppSap\AppSap.Exe (32 bits)
Size: 4,378,112 bytes
Compiler version: Harbour 3.2.0dev (r1801051438)
FiveWin version: FWH 17.11
C compiler version: Borland/Embarcadero C++ 7.0 (32-bit)
Windows version: 6.2, Build 9200
Time from start: 0 hours 0 mins 3 secs
Error occurred at: 08/07/2018, 17:40:20
Error description: (DOS Error -2147352567) WINOLE/1007 El identificador de fila se refirió a una fila eliminada o a una fila marcada para eliminar. (0x80040E23): Microsoft Cursor Engine
Stack Calls
===========
Called from: => TOLEAUTO:ABSOLUTEPOSITION( 0 )
Called from: .\source\classes\XBROWSE.PRG => (b)TXBROWSE_SETADO( 5620 )
Called from: .\source\classes\XBROWSE.PRG => (b)TXBROWSE( 504 )
Called from: .\source\classes\XBROWSE.PRG => TXBROWSE:KEYNO( 0 )
Called from: .\source\classes\XBROWSE.PRG => (b)TXBROWSE( 605 )
Called from: .\source\classes\XBROWSE.PRG => TXBROWSE:VUPDATEPOS( 0 )
Called from: .\source\classes\XBROWSE.PRG => (b)TXBROWSE( 500 )
Called from: .\source\classes\XBROWSE.PRG => TXBROWSE:KEYCOUNT( 0 )
Called from: .\source\classes\XBROWSE.PRG => TXBROWSE:ADJUST( 1433 )
Called from: .\source\classes\XBROWSE.PRG => TXBROWSE:INITIATE( 1193 )
Called from: => __OBJSENDMSG( 0 )
Called from: .\source\function\HARBOUR.PRG => OSEND( 291 )
Called from: .\source\function\HARBOUR.PRG => ASEND( 259 )
Called from: .\source\classes\DIALOG.PRG => TDIALOG:INITIATE( 655 )
Called from: .\source\classes\DIALOG.PRG => TDIALOG:ACTIVATE( 331 )
Called from: Source\AppSap9c.Prg => APPSAP9C( 153 )
Called from: Source\AppSap.Prg => (b)HAZMENU( 530 )
Called from: .\source\classes\MENU.PRG => TMENU:COMMAND( 1548 )
Called from: .\source\classes\WINDOW.PRG => TWINDOW:COMMAND( 1081 )
Called from: .\source\classes\MDIFRAME.PRG => TMDIFRAME:COMMAND( 262 )
Called from: => TMDIFRAME:HANDLEEVENT( 0 )
Called from: .\source\classes\WINDOW.PRG => _FWH( 3348 )
Called from: => WINRUN( 0 )
Called from: .\source\classes\WINDOW.PRG => TMDIFRAME:ACTIVATE( 1037 )
Called from: Source\AppSap.Prg => MAIN( 164 )
With Best regards
Saludos