Dear Rao Sir ,
Expecting .F. value when oRs:Seek( Alltrim ( chr( nKey) ) , .T. ) method fails to seek the desired record. But the oRs:Seek method always return .T.
Please guide me on this. Thanks in advance...!
Thanks
Shridhar
function TestSeek()
local oCn := FW_DemoDB()
local oRs
oRs := oCn:RowSet( "states" )
oRs:Sort := "CODE" // Same as oRs:SetOrder( "CODE" ) / oRs:OrdSetFocus( "CODE" )
oRs:GoTop() // Same as oRs:MoveFirst()
// Now the values of the field "CODE" are arranged in this order:
//
// AK,AL,AR,AZ,CA,CO,CT,DC,DE,FL,GA,HI,IA,ID,IL,IN,KS,KY,LA,MA,
// MD,ME,MI,MN,MO,MS,MT,NC,ND,NE,NH,NJ,NM,NV,NY,OH,OK,OR,PA,RI,
// SC,SD,TN,TX,UT,VA,VT,WA,WI,WV,WY
//
// HardSeek
? oRs:Code // -> AK
? oRs:Seek( "C" ), oRs:Code // .T., CA
? oRs:Seek( "E" ), oRs:Code // .F., CA
? oRs:Seek( "X" ), oRs:Code // .F., CA
oRs:GoTop()
// SoftSeek
? oRs:Code // -> AK
? oRs:Seek( "C", .t. ), oRs:Code // .T., CA
? oRs:Seek( "E", .t. ), oRs:Code // .T., FL
? oRs:Seek( "X", .t. ), oRs:Code // .F., FL
oRs:Close()
oCn:Close()
return nil
oRs:Locate( "last = 'ge' .and. first = 'aa'" ) //--> lfound
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: Google [Bot] and 95 guests