Hi,
I have a Xbrowse with a record set .
Is it possible to refresh the record set only for the current line of the xbrowse .
I"d like to make a requery only for the current record .
Thanks .
Jack wrote:oRs:resync(1,2)
oRs:resync(1)
function EDFUNC(pid)
local cSql
...edit fields
cSQL := "UPDATE PATREC SET NAME="+"'"+alltrim(wname)+"'" +" WHERE ID="+"'"+alltrim(pid)+"'"
TRY
oCon:Execute(cSql)
CATCH oErr
ShowAdoEr( oCon,csql )
END TRY
*
return .T.
Anyway, Resync method never worked for me...
AHF wrote:Enrico in what context?
Jack wrote:I just test it and it works .
//-------
Func _EditUm( oRs,oLbx,cSql )
Local nEId,oRs2
nEid := oRs:Fields("PrimaryKey"):Value
// do your edits with another oRs2
oRs2:CLose()
oRs:CLose() // yes close the orig recordset assoc with oLbx
// do not redefine oRs .. just reuse
// cSql is the original query statement
TRY
oRs:Open( cSQL,oCONNECT ) // oConnect is a defined public connection object
CATCH oErr
MsgInfo( "Error in Opening table" ) // bad news if this happens
RETURN(.F.)
END TRY
oRs:MoveFirst()
oRs:Find( "[PrimaryKey] = "+ltrim(str(nEid)) )
oLbx:ReFresh()
Return(.t.)
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: No registered users and 112 guests