oRsCli:Find("CLI_CLI = " + "'" + STR(nIrA,5,0) + "'" )
WITH OBJECT oRs
if :RecordCount() > 0
n := :AbsolutePosition
TRY
:Delete()
CATCH
:CancelUpdate()
:ReQuery()
END
if :RecordCount() > 0
:AbsolutePosition := Max( 1, Min( n, :RecordCount() ) )
endif
endif
END
oBrw:Delete()
oCn := FW_OpenAdoConnection( { "MYSQL", cServer, cDatabase, cUser, cPassword }, .t. )
if oCn == nil
? "connection fail"
return nil
endif
xRfc :="XAXX010101XXX"
// for exact seek
cSeek := "rfc='" + xRfc + "'"
// for soft seek
cSeek := "rfc like '" + xRfc + "*'"
oRs := FW_OpenRecordSet( oCn, "select * from clients order by rfc" )
oRs:Find( cSeek, 0, 1, 1 )
if oRs:Eof()
? "Not Found"
oRs:MoveFirst()
else
? oRs:Fields( "Name" ):Value, oRs:Fields( "Address" ):Value
endif
Armando wrote:Servicomver:
Ya entrados en gastos, te recomiendo que no uses la función oRs:AddNew() + oRs:Update(), mas adelante
te puedes encontrar con pequeños problemas, en su lugar utiliza los comandos INSERT INTO y UPDATE.
Saludos
oRs:AddNew()
// assign field values
oRs:Update()
oRs:AddNew( ArrayOfFieldNamesOrNumbers, ArrayOfValues )
Return to FiveWin para Harbour/xHarbour
Users browsing this forum: Google [Bot] and 26 guests