Very nice !
Thank you for the changes. Learning a lot with this. Have become a nice sample!
Using: FWH 23.08 with Harbour
Very nice !
Thank you for the changes. Learning a lot with this. Have become a nice sample!
Adolfo wrote:Mr Rao.
Is there something like oRowset:GetBlankRow() as in tDolphin, which I found quite easy to create a blank or default set of values for the current table to fiil with new values an insert it into the table.
Regards
From Chile
Adolfo
Hello,
Is there a method similar to dolphin SetWere to change where condition in query result ? i don't how Rowset and requery works.
Example in Tdolphin
oQry:= oServer:Query("Select * from customers") // All customers
oQry:SetWhere("sate='NY'") //Only NY State
oQry:SetWhere("") // All customers again reset where
Regards,
oRs := oCn:RowSet( "select * from customer" )
// or
oRs := oCn:RowSet( "customer" )
// or
oRs := oCn:Customer  // fwh16.12oRs:SetFilter( "state='NY'" )
// or
oRs:SetFilter( "state='WA' .and. age > 30" )
? oRs:cFilter  // to know present filter
oRs:SetFilter( "" ) // Clear filteroRs:SetOrder( "age" )
// or
oRs:Sort := "age"
//
? oRs:Sort  // to know the present sort orderoRs:SetFilter( "state = ?", { "NY" } ) // same as "state = 'NY'"
// later change the filter to another state
oRs:ReFilter( { "WA" } ) // same effect as "state = 'WA'"Nages.
I have a doubt, how can you do you the following in FWHMARIA.
I have a big xbrowse routine which captures key strokes, functions keys and a personalized popup menu that calls functions for appending, modifying, deleting, listing etc.
I have a large clients table, but in a xbrowse I just show 4 fields out of 20+, in tDolphin, I have an extra dialog, a big one with lot of validations items, after that I save modifications and do:
oDbCli:LoadQuery(.F.)
oBrw:DrawLine()
and only the current line in xBrowse is altered and updated.
When appending new records, I do the same, call another extra dialog, its different from the one used for modifying data, after saving I do:
oDbCli:Refresh(.F.)
oBrw:DrawLine()
and the new record is shown in the xbrowse in the place it is supposed to be (acording to key order)
You advice us to use oDbCli:bEdit, and oBrw:EditSource( .t. ), but I prefer a more (complex) controlled way because I have permissions on appending, modifying, which are different for every user.
How can I do the refreshing of the data shown in the xBrowsethe same way I do it with tDolphin.
Regards.
From Chile, Adolfo
Mr.Rao
oRs:SetOrder( "age" )
// or
oRs:Sort := "age"
//
? oRs:Sort // to know the present sort order
Is it possible to sort by more than one column?
example :
oRs:SetOrder( "age,date,id,..." )
// or
oRs:Sort := "age,date,id,..."
//
? oRs:Sort // to know the present sort order
Att
Joao Carlos
VinheSoft
oRs:SetOrder( "age,date,id,..." )
// or
oRs:Sort := "age,date,id,..."
//
I have a large clients table, but in a xbrowse I just show 4 fields out of 20+,
Hi Nages.
Yes, I only show 4 out of 20+ fields, the others are loaded in a personalized dialog when you want to see, edit, modify the record, mainly because there are a lot of validations in some fields and not every user has privileges to edit some of them.
I use this approach with almost all the tables in a big ERP, just the auxiliary tables like cities, Tipe of taxes, discount % etc have 2 or 3 fields which can be easily modified inside the xbrowse.
Regards, from Chile
Adolfo
I only show 4 out of 20+ fields,
Select f1,f2,f3,f4 from clients
f1 anf f2 are Keys (unique both)
When I load the whole Record, I also load relations with other tables, history sales or payments records etc.
Thanks in advance.
oDbCli:LoadQuery(.F.)
oBrw:DrawLine()oRs:Resync()
oBrw:RefreshCurrent() // same as oBrw:DrawLine()oDbCli:Refresh(.F.)
oBrw:DrawLine()oRs:ReQuery()
// position the record on the just appended record
oRs:Refresh()Mr Adolfo
Please also see the new sample posted about oBrw:EditBaseRecord()
You may consider if it can be useful to you.
HOW TO MAKE ?
IN TDOLPHIN
oQry := TDolphinQry():New("select * from country ", oServer )
oQry:setWhere("name like '%REPLUBLICA%'",.T.) // QUERY RESULT -> select * from country where name like '%REPLUBLICA%
to clean
oQry:setWhere("",.T.) // QUERY RESULT -> select * from country
IN TMARIADB ????
oRs := oCn:RowSet( "SELECT * FROM country WHERE NAME LIKE ?", { "%REPLUBLICA%" } )
Later
oRs:Requery( { "%OTHERNAME%" } )
oRs := oCn:RowSet( "SELECT * FROM country ?", { "" } )
Later
oRs:ReQuery( { "WHERE name like '%REPLUBICA%' } )
Later
oRs:ReQuery( { "" } )
Later
oRs:ReQuery( { "WHERE age > 40" } )