FUNCTION GrabaLinea(lAp)
If lAp
oQryTemI:lAppend := .T.
EndIf
oQryTemI:Linea:=nLinea
TRY
// oQryTemI:lNuevo:=1
nLinea+=1
oQryTemI:Save()
oQryTemI:Refresh()
CATCH oError
MsgStop("Error al grabar..."+CHR(10)+oError:description,"Error")
lSave :=.F.
END TRY
Return(.T.)
Last edited by caducca on Sun Aug 18, 2019 3:58 pm, edited 1 time in total.
Saludos, cual error te esta dando.?, quita el TRY un momento para que te cree el LOG de error y asi puedas postearlo para tener idea de lo que pasa, gracias...
Application
===========
Path and name: C:\DISCO-D\PROGRAMS\VENTASQL\VentaSQL.exe (32 bits)
Size: 4,299,776 bytes
Compiler version: Harbour 3.2.0dev (r1801051438)
FiveWin version: FWH 17.05
C compiler version: Borland/Embarcadero C++ 7.0 (32-bit)
Windows version: 6.2, Build 9200
Time from start: 0 hours 0 mins 14 secs
Error occurred at: 16/08/2019, 12:55:31
Error description: Error MYSQL/1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'desc=0.00,precio2=0.00,pretotal=0,precosto=0,preusa=0,linea=1,codartp=NULL' at line 1
Stack Calls
===========
Called from: .\source\prg\tdolpsrv.prg => DOLPHIN_DEFERROR( 2807 )
Called from: .\source\prg\tdolpsrv.prg => TDOLPHINSRV:CHECKERROR( 793 )
Called from: .\source\prg\tdolpsrv.prg => TDOLPHINSRV:SQLQUERY( 2024 )
Called from: .\source\prg\tdolpqry.prg => TDOLPHINQRY:SAVE( 1456 )
Called from: c:\disco-d\programs\ventasql\prgh\Remitos.prg => GRABALINEA( 411 )
Called from: c:\disco-d\programs\ventasql\prgh\Remitos.prg => (b)EDITREMI( 371 )
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( 1866 )
Called from: .\source\classes\WINDOW.PRG => _FWH( 3325 )
Called from: => DIALOGBOX( 0 )
Called from: .\source\classes\DIALOG.PRG => TDIALOG:ACTIVATE( 296 )
Called from: c:\disco-d\programs\ventasql\prgh\Remitos.prg => EDITREMI( 378 )
Called from: c:\disco-d\programs\ventasql\prgh\Remitos.prg => (b)CARREMITOS( 269 )
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( 1866 )
Called from: .\source\classes\WINDOW.PRG => _FWH( 3325 )
Called from: => DIALOGBOX( 0 )
Called from: .\source\classes\DIALOG.PRG => TDIALOG:ACTIVATE( 296 )
Called from: c:\disco-d\programs\ventasql\prgh\Remitos.prg => CARREMITOS( 303 )
Called from: c:\disco-d\programs\ventasql\prgh\Ventas.prg => (b)MAIN( 91 )
Called from: .\source\classes\MENU.PRG => TMENU:ACTIVATE( 1350 )
Called from: .\source\classes\TRBTN.PRG => TRBTN:LBUTTONUP( 883 )
Called from: .\source\classes\CONTROL.PRG => TCONTROL:HANDLEEVENT( 1721 )
Called from: .\source\classes\TRBTN.PRG => TRBTN:HANDLEEVENT( 1575 )
Called from: .\source\classes\WINDOW.PRG => _FWH( 3325 )
Called from: => WINRUN( 0 )
Called from: .\source\classes\WINDOW.PRG => TMDIFRAME:ACTIVATE( 1036 )
Called from: c:\disco-d\programs\ventasql\prgh\Ventas.prg => MAIN( 356 )
System
======
CPU type: Intel(R) Core(TM) i3-7100U CPU @ 2.40GHz 2400 Mhz
Hardware memory: 3991 megs
Free System resources: 90 %
GDI resources: 90 %
User resources: 90 %
Windows total applications running: 6
1 ,
2 , C:\DISCO-D\PROGRAMS\VENTASQL\VentaSQL.exe
3 , C:\WINDOWS\System32\shcore.dll
4 , C:\WINDOWS\WinSxS\x86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.17134.950_none_42eadaf
5 DDE Server Window, C:\WINDOWS\System32\OLE32.DLL
6 G, C:\WINDOWS\WinSxS\x86_microsoft.windows.gdiplus_6595b64144ccf1df_1.1.17134.950_none_73d5cde39f7876b
Variables in use
================
Procedure Type Value
==========================
DOLPHIN_DEFERROR
Param 1: O Class: ERROR
TDOLPHINSRV:CHECKERROR
Param 1: O Class: TDOLPHINSRV
Param 2: N 1064
Param 3: L .F.
Param 4: C ""
Local 1: C ""
Local 2: O Class: ERROR
TDOLPHINSRV:SQLQUERY
Local 1: N 1064
Local 2: U
Local 3: L .F.
TDOLPHINQRY:SAVE
Param 1: C "INSERT INTO temp_item SET id=0,codarti='010001007',detalle='BATERIA YB2.5L-C YUASA',cantidad=1.00,precio=0,desc=0.00,precio2=0.00,pretotal=0,precosto=0,preusa=0,linea=1,codartp=NULL"
Local 1: N 181
Local 2: N 1
GRABALINEA
Local 1: C "temp_item"
Local 2: U
Local 3: C "INSERT INTO temp_item SET id=0,codarti='010001007',detalle='BATERIA YB2.5L-C YUASA',cantidad=1.00,precio=0,desc=0.00,precio2=0.00,pretotal=0,precosto=0,preusa=0,linea=1,codartp=NULL"
Local 4: C " "
Local 5: U
Local 6: L .T.
Local 7: L .F.
Local 8: U
(b)EDITREMI
Param 1: L .T.
TBTNBMP:CLICK
Param 1: O Class: TBTNBMP
TBTNBMP:LBUTTONUP
TCONTROL:HANDLEEVENT
Param 1: N 20
Param 2: N 26
Param 3: N 0
Local 1: L .T.
Local 2: N 0
Local 3: S
TBTNBMP:HANDLEEVENT
Param 1: N 514
Param 2: N 0
Param 3: N 1310746
Local 1: U
_FWH
Param 1: N 514
Param 2: N 0
Param 3: N 1310746
DIALOGBOX
Param 1: N 1310746
Param 2: N 514
Param 3: N 0
Param 4: N 1310746
Param 5: N 101
Local 1: O Class: TBTNBMP
TDIALOG:ACTIVATE
Param 1: N 4194304
Param 2: C "DATOSITEM2"
Param 3: N 1183684
Param 4: O Class: TDIALOG
EDITREMI
Param 1: U
Param 2: U
Param 3: U
Param 4: L .T.
Param 5: U
Param 6: L .T.
Param 7: U
Param 8: U
Param 9: U
Param 10: U
Param 11: U
Local 1: N 1183684
Local 2: S
Local 3: O Class: TDIALOG
(b)CARREMITOS
Param 1: L .T.
Param 2: C "E"
Param 3: L .T.
TBTNBMP:CLICK
Param 1: O Class: TBTNBMP
TBTNBMP:LBUTTONUP
TCONTROL:HANDLEEVENT
Param 1: N 30
Param 2: N 28
Param 3: N 0
Local 1: L .T.
Local 2: N 0
Local 3: S
TBTNBMP:HANDLEEVENT
Param 1: N 514
Param 2: N 0
Param 3: N 1966108
Local 1: U
_FWH
Param 1: N 514
Param 2: N 0
Param 3: N 1966108
DIALOGBOX
Param 1: N 1966108
Param 2: N 514
Param 3: N 0
Param 4: N 1966108
Param 5: N 86
Local 1: O Class: TBTNBMP
TDIALOG:ACTIVATE
Param 1: N 4194304
Param 2: C "CARGAREMI"
Param 3: N 658860
Param 4: O Class: TDIALOG
CARREMITOS
Param 1: U
Param 2: U
Param 3: U
Param 4: L .T.
Param 5: U
Param 6: L .T.
Param 7: U
Param 8: U
Param 9: U
Param 10: U
Param 11: U
Local 1: N 658860
Local 2: S
Local 3: O Class: TDIALOG
(b)MAIN
Param 1: C "E"
Local 1: L .F.
Local 2: L .F.
Local 3: L .T.
TMENU:ACTIVATE
Param 1: O Class: TMENUITEM
TRBTN:LBUTTONUP
Param 1: N 66
Param 2: N 145
Param 3: O Class: TRBGROUP
Param 4: L .F.
Local 1: N 0
Local 2: A Len: 2
TCONTROL:HANDLEEVENT
Param 1: N 8
Param 2: N 58
Param 3: N 0
Local 1: L .T.
Local 2: L .T.
Local 3: S
TRBTN:HANDLEEVENT
Param 1: N 514
Param 2: N 0
Param 3: N 524346
Local 1: U
_FWH
Param 1: N 514
Param 2: N 0
Param 3: N 524346
WINRUN
Param 1: N 524346
Param 2: N 514
Param 3: N 0
Param 4: N 524346
Param 5: N 16
Local 1: O Class: TRBTN
TMDIFRAME:ACTIVATE
Param 1: N 658860
MAIN
Param 1: C "MAXIMIZED"
Param 2: U
Param 3: U
Param 4: U
Param 5: U
Param 6: U
Param 7: U
Param 8: U
Param 9: U
Param 10: U
Param 11: U
Param 12: U
Param 13: U
Param 14: U
Param 15: U
Param 16: U
Param 17: U
Param 18: U
Param 19: U
Param 20: L .F.
Local 1: O Class: TMDIFRAME
Local 2: U
Local 3: U
Error mio, usaba un campo desc para garbar el descuento pero es una palabra reservada.
Disculpen a los que hice perder el tiempo con esta consulta, pero por ahí llega un momento que te nublas y es preferible parar, recostarte y la almohada te tira algunas pistas.
Gracias