Conversión varchar en datetime produjo valor fuera intervalo
Posted: Tue Dec 13, 2022 4:08 pm
Hola, estoy reconstruyendo mi base de datos despues de la visita de un Ramsonware y me está dando este error que antes no sucedia.
Lo extraño es que si acceso la base de datos directamente en el PC donde está el servidor, no sucede, sin embargo si lo hago a través de la red local se produce el error.
La BD está en MSSQLEXPRESS.
Agradezco de antemano quien me pueda ayudar.
Lo extraño es que si acceso la base de datos directamente en el PC donde está el servidor, no sucede, sin embargo si lo hago a través de la red local se produce el error.
La BD está en MSSQLEXPRESS.
Agradezco de antemano quien me pueda ayudar.
Esta es la instrucción donde se produce el error :
Application
===========
Path and name: C:\SIS\DesaFW\FactNew\FactNew.exe (32 bits)
Size: 5,706,240 bytes
Compiler version: Harbour 3.2.0dev (r2008190002)
FiveWin version: FWH 21.02
C compiler version: Borland/Embarcadero C++ 7.0 (32-bit)
Windows version: 10.0, Build 22621
Time from start: 0 hours 0 mins 19 secs
Error occurred at: 13/12/2022, 12:32:46
Error description: (DOS Error -2147352567) WINOLE/1007 La conversión del tipo de datos varchar en datetime produjo un valor fuera de intervalo. (0x80040E07): Microsoft OLE DB Driver for SQL Server
Args:
[ 1] = C UPDATE PAGBORR SET PgTipo = 'EF', PgFecha = '2022-12-13', PgHora = '12:32', PgFCobr = '2022-12-13', PgMonto = 100.00, PgSerie = '', PgBanco = '', PgPlaza = '', PgCuent = '' WHERE Id = 120
Stack Calls
===========
Called from: => TOLEAUTO:EXECUTE( 0 )
Called from: C:\SIS\DesaFW\FactNew\BORRADOR.PRG => GRABACAJA( 3439 )
Called from: C:\SIS\DesaFW\FactNew\BORRADOR.PRG => PRINTDOCTO( 3280 )
Called from: C:\SIS\DesaFW\FactNew\BORRADOR.PRG => (b)INCAJABORR( 3258 )
Called from: .\source\classes\BUTTON.PRG => TBUTTON:CLICK( 179 )
Called from: .\source\classes\CONTROL.PRG => TBUTTON:HANDLEEVENT( 1781 )
Called from: .\source\classes\WINDOW.PRG => _FWH( 3559 )
Called from: => SENDMESSAGE( 0 )
Called from: .\source\classes\DIALOG.PRG => TDIALOG:COMMAND( 433 )
Called from: => TWINDOW:HANDLEEVENT( 0 )
Called from: .\source\classes\DIALOG.PRG => TDIALOG:HANDLEEVENT( 1140 )
Called from: => DIALOGBOX( 0 )
Called from: .\source\classes\DIALOG.PRG => TDIALOG:ACTIVATE( 304 )
Called from: C:\SIS\DesaFW\FactNew\BORRADOR.PRG => INCAJABORR( 3263 )
Called from: C:\SIS\DesaFW\FactNew\BORRADOR.PRG => INGPAGO( 2364 )
Called from: C:\SIS\DesaFW\FactNew\BORRADOR.PRG => (b)INIDIALOG( 1007 )
Called from: .\source\classes\BTNBMP.PRG => TBTNBMP:CLICK( 713 )
Called from: .\source\classes\BTNBMP.PRG => TBTNBMP:LBUTTONUP( 999 )
Called from: .\source\classes\CONTROL.PRG => TCONTROL:HANDLEEVENT( 1817 )
Called from: .\source\classes\BTNBMP.PRG => TBTNBMP:HANDLEEVENT( 2051 )
Called from: .\source\classes\WINDOW.PRG => _FWH( 3559 )
Called from: => DIALOGBOX( 0 )
Called from: .\source\classes\DIALOG.PRG => TDIALOG:ACTIVATE( 304 )
Called from: C:\SIS\DesaFW\FactNew\BORRADOR.PRG => BORRADOR( 596 )
Called from: C:\SIS\DesaFW\FactNew\FACTNEW.PRG => (b)MAIN( 518 )
Called from: .\source\classes\BTNBMP.PRG => TBTNBMP:CLICK( 713 )
Called from: .\source\classes\BTNBMP.PRG => TBTNBMP:LBUTTONUP( 999 )
Called from: .\source\classes\CONTROL.PRG => TCONTROL:HANDLEEVENT( 1817 )
Called from: .\source\classes\BTNBMP.PRG => TBTNBMP:HANDLEEVENT( 2051 )
Called from: .\source\classes\WINDOW.PRG => _FWH( 3559 )
Called from: => WINRUN( 0 )
Called from: .\source\classes\WINDOW.PRG => TWINDOW:ACTIVATE( 1097 )
Called from: C:\SIS\DesaFW\FactNew\FACTNEW.PRG => MAIN( 542 )
System
======
CPU type: 11th Gen Intel(R) Core(TM) i7-11800H @ 2.30GHz 2304 Mhz
Hardware memory: 7830 megs
Free System resources: 90 %
GDI resources: 90 %
User resources: 90 %
Windows total applications running: 6
1 ,
2 , C:\WINDOWS\System32\SHELL32.dll
3 , C:\WINDOWS\WinSxS\x86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.22621.608_none_f0f1837
4 Conmutación de tareas, C:\SIS\DesaFW\FactNew\FactNew.exe
5 DDE Server Window, C:\WINDOWS\System32\OLE32.DLL
6 GDI+ Window (FactNew.exe), C:\WINDOWS\WinSxS\x86_microsoft.windows.gdiplus_6595b64144ccf1df_1.1.22621.819_none_21dd7a56301966e
Code: Select all | Expand
cSql := "UPDATE PAGBORR SET "
cSql += "PgTipo = '" + aPAGBORR[nIndM, 1] + "', " // PgTipo
cSql += "PgFecha = " + FW_ValToSQL(aPAGBORR[nIndM, 3]) + ", " // PgFecha
cSql += "PgHora = '" + SUBSTR(TIME(),1,5) + "', " // PgHora
cSql += "PgFCobr = " + FW_ValToSQL(aPAGBORR[nIndM, 3]) + ", " // PgFCobr
cSql += "PgMonto = " + STR(aPAGBORR[nIndM, 2]) + ", " // PgMonto
cSql += "PgSerie = '" + RTRIM(aPAGBORR[nIndM, 4]) + "', " // PgSerie
cSql += "PgBanco = '" + RTRIM(aPAGBORR[nIndM, 5]) + "', " // PgBanco
cSql += "PgPlaza = '" + RTRIM(aPAGBORR[nIndM, 6]) + "', " // PgPlaza
cSql += "PgCuent = '" + RTRIM(aPAGBORR[nIndM, 7]) + "' " // PgCuent
cSql += "WHERE Id = " + STR(aPAGBORR[nIndM, 8]) // Id
oCn:Execute( cSql )