FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin para Harbour/xHarbour Error usando UPDATE de SQL
Posts: 396
Joined: Tue Mar 18, 2008 09:41 PM
Error usando UPDATE de SQL
Posted: Tue May 12, 2009 10:23 AM
Hola!

Tengo un problemita cuando quiero actualizar una tabla.
Me da un error. Sin embargo, si ejecuto consultas, entonces no da error.

Trabajo con recordset y SQL Server 2005.
Esta es la clausula que utilizo.

Code (fw): Select all Collapse
cStrSql := "UPDATE datos SET nombre = 'pepe'"

oRsUpdate:Source := cStrSql
oRsUpdate:activeConnection( oCnnDb ) 
oRsUpdate:Open()

oRsUpdate:Close()


Lo más curioso de todo, es que actualiza la tabla perfectamente.
El error biene cuando intento cerrar el RecordSet.
:-)

Code (fw): Select all Collapse
oRsUpdate:Close()


El error muestra este mensaje:
Code (fw): Select all Collapse
Application
===========
   Path and name: c:\FWH\prueba\prueba.exe (32 bits)
   Size: 2,117,120 bytes
   Time from start: 0 hours 0 mins 5 secs 
   Error occurred at: 12-05-09, 12:21:25
   Error description: Error ADODB.RecordSet/6  DISP_E_UNKNOWNNAME: CLOSE
   Args:

Stack Calls
===========
   Called from:  => TOLEAUTO:CLOSE(0)
   Called from: .\modif.PRG => FUPDATE(0)
   Called from: .\modif.PRG => (b)FOPENMODIFICACIONES(0)
   Called from:  => TBTNBMP:CLICK(0)
   Called from:  => TBTNBMP:LBUTTONUP(0)
   Called from:  => TWINDOW:HANDLEEVENT(0)
   Called from:  => TCONTROL:HANDLEEVENT(0)
   Called from:  => TBTNBMP:HANDLEEVENT(0)
   Called from: .\source\classes\WINDOW.PRG => _FWH(0)
   Called from:  => WINRUN(0)
   Called from:  => TMDIFRAME:ACTIVATE(0)
   Called from: .\prueba.PRG => MAIN(0)
Javier,

FWH 8.04 2008

Continue the discussion