Mr. Rao,
hago un query, y el datarow es ! lreadonly, hago un requery y el que obtengo es lreadonly, por qué?
Saludos.
Requery nativa Mr.Rao.
- Rick Lipkin
- Posts: 2677
- Joined: Fri Oct 07, 2005 1:50 pm
- Location: Columbia, South Carolina USA
- Been thanked: 2 times
Re: Requery nativa Mr.Rao.
Ariel
It depends on how you setup the recordset ... This is the old fashioned way .. notice openkeyset
Here is a good link
https://wiki.fivetechsoft.com/doku.php? ... ted_stuffs
Rick Lipkin
It depends on how you setup the recordset ... This is the old fashioned way .. notice openkeyset
Code: Select all | Expand
cSQL := "SELECT * from USERINFO order by USERID"
oRsUSER := TOleAuto():New( "ADODB.Recordset" )
oRsUSER:CursorType := 1 // opendkeyset
oRsUSER:CursorLocation := 3 // local cache
oRsUSER:LockType := 3 // lockoportunistic
TRY
oRsUSER:Open( cSQL,xConnect )
CATCH oErr
MsgInfo( "Error in Opening USERINFO table" )
RETURN(.F.)
END TRY
Here is a good link
https://wiki.fivetechsoft.com/doku.php? ... ted_stuffs
Rick Lipkin
Re: Requery nativa Mr.Rao.
Rick,
gracias por contestar, pero uso fwh nativa directamente. Hago :
oSql:= oCon:Query( "SELECT * FROM articulos" )
? oSql:lreadonly --> .f.
Luego del :Requery() si lo edito :
oRec:= TDataRow():New( ::oSql )
? oRec:lReadonly, oRec:uSource:lReadOnly ---> .t., .t.
por que hace esto ???
gracias por contestar, pero uso fwh nativa directamente. Hago :
oSql:= oCon:Query( "SELECT * FROM articulos" )
? oSql:lreadonly --> .f.
Luego del :Requery() si lo edito :
oRec:= TDataRow():New( ::oSql )
? oRec:lReadonly, oRec:uSource:lReadOnly ---> .t., .t.
por que hace esto ???
- nageswaragunupudi
- Posts: 10733
- Joined: Sun Nov 19, 2006 5:22 am
- Location: India
- Been thanked: 11 times
- Contact:
Re: Requery nativa Mr.Rao.
There should be no problem with a simple Requery() or Requery( {aparms} ) with params.
The problem is when Requery( cNewQuery ) is used with a totally different Sql query.
Please confirm.
We are sending you revised libs with the fix.
The problem is when Requery( cNewQuery ) is used with a totally different Sql query.
Please confirm.
Code: Select all | Expand
#include "fivewin.ch"
function Main()
local oCn, oRs
oCn := FW_DemoDB()
oRs := oCn:RowSet( "select * from customer" )
? oRs:lReadOnly // --> .f.
oRs:Requery()
? oRs:lReadOnly // --> .f.
oRs:Requery( "select * from states" ) // Here is the problem. Bug
? oRs:lReadOnly // --> .t. // Should be .f. but it is .t.
oRs:Close()
oCn:Close()
return nil
We are sending you revised libs with the fix.
Regards
G. N. Rao.
Hyderabad, India
G. N. Rao.
Hyderabad, India
Re: Requery nativa Mr.Rao.
Mr. Rao,
exactamente la segunda opción es lo que me sucede, pero el query es el mismo solo que cambia el where, pero el llamado es :requery( cNewQuery )
Saludos.
exactamente la segunda opción es lo que me sucede, pero el query es el mismo solo que cambia el where, pero el llamado es :requery( cNewQuery )
Saludos.