I want to revised current query but still keep current query alike.
oCn:Rowset('select * from customer where id=1')
revised query to
::cQuery += ::cQuery+' or id=2'
How can I do it?
Thanks in advance,
How to get (return) current Query MySql (FWMARIADB)?
How to get (return) current Query MySql (FWMARIADB)?
Regards,
Dutch
FWH 19.01 / xHarbour Simplex 1.2.3 / BCC73 / Pelles C / UEStudio
FWPPC 10.02 / Harbour for PPC (FTDN)
ADS V.9 / MySql / MariaDB
R&R 12 Infinity / Crystal Report XI R2
(Thailand)
Dutch
FWH 19.01 / xHarbour Simplex 1.2.3 / BCC73 / Pelles C / UEStudio
FWPPC 10.02 / Harbour for PPC (FTDN)
ADS V.9 / MySql / MariaDB
R&R 12 Infinity / Crystal Report XI R2
(Thailand)
- nageswaragunupudi
- Posts: 10729
- Joined: Sun Nov 19, 2006 5:22 am
- Location: India
- Been thanked: 10 times
- Contact:
Re: How to get (return) current Query MySql (FWMARIADB)?
With all previous versions:
Alternatively, if this suits:
With FWH 1805 (under release)
Code: Select all | Expand
cSql := "select * from customer ?"
oRs := oCn:RowSet( cSql, { "where id = 1" } )
// Later
oRs:ReQuery( { "where id = 1 or id = 2" } )
Alternatively, if this suits:
Code: Select all | Expand
cSql := "select * from customer where id between ? and ?"
oRs := oCn:RowSet( cSql, { 1, 1 } )
// Later
oRs := oCn:RowSet( cSql, { 1, 2 } )
With FWH 1805 (under release)
Code: Select all | Expand
cSql := "select * from customer where od = 1"
oRs := oCn:RowSet( cSql )
// later
cSql += " or id = 2"
oRs:Requery( cSql )
Regards
G. N. Rao.
Hyderabad, India
G. N. Rao.
Hyderabad, India
Re: How to get (return) current Query MySql (FWMARIADB)?
Dear Mr.Rao,
Thank you, but the query is dynamic. It is not exactly the same in a procedure.
In many scenario, I don't need to requery(). But in some case, I have to revised.
Example.
=========
1. I query reservation (booking) with unique number (id) and I copy to new reservation and requery(). I cannot show all lists after copy.
2. I query reservation (booking) with customer name. It will show well after copy and requery(), because it is the same name.
Thanks once again.
Thank you, but the query is dynamic. It is not exactly the same in a procedure.
In many scenario, I don't need to requery(). But in some case, I have to revised.
Example.
=========
1. I query reservation (booking) with unique number (id) and I copy to new reservation and requery(). I cannot show all lists after copy.
2. I query reservation (booking) with customer name. It will show well after copy and requery(), because it is the same name.
Thanks once again.
Regards,
Dutch
FWH 19.01 / xHarbour Simplex 1.2.3 / BCC73 / Pelles C / UEStudio
FWPPC 10.02 / Harbour for PPC (FTDN)
ADS V.9 / MySql / MariaDB
R&R 12 Infinity / Crystal Report XI R2
(Thailand)
Dutch
FWH 19.01 / xHarbour Simplex 1.2.3 / BCC73 / Pelles C / UEStudio
FWPPC 10.02 / Harbour for PPC (FTDN)
ADS V.9 / MySql / MariaDB
R&R 12 Infinity / Crystal Report XI R2
(Thailand)
- nageswaragunupudi
- Posts: 10729
- Joined: Sun Nov 19, 2006 5:22 am
- Location: India
- Been thanked: 10 times
- Contact:
Re: How to get (return) current Query MySql (FWMARIADB)?
With FWH 1805, you have the maximum possible flexibility.
Example:
What more flexibilty you want?
Example:
Code: Select all | Expand
oRs := oCn:RowSet( "select * from customer" )
// later
oRs:Requery( "select * from states" )
What more flexibilty you want?
Regards
G. N. Rao.
Hyderabad, India
G. N. Rao.
Hyderabad, India
Re: How to get (return) current Query MySql (FWMARIADB)?
Dear Mr.Rao,
It's ok for now. I'm waiting for upgrade to 1805.
Thank you so much for your kindness help.
It's ok for now. I'm waiting for upgrade to 1805.
nageswaragunupudi wrote:With FWH 1805, you have the maximum possible flexibility.
Example:Code: Select all | Expand
oRs := oCn:RowSet( "select * from customer" )
// later
oRs:Requery( "select * from states" )
What more flexibilty you want?
Thank you so much for your kindness help.
Regards,
Dutch
FWH 19.01 / xHarbour Simplex 1.2.3 / BCC73 / Pelles C / UEStudio
FWPPC 10.02 / Harbour for PPC (FTDN)
ADS V.9 / MySql / MariaDB
R&R 12 Infinity / Crystal Report XI R2
(Thailand)
Dutch
FWH 19.01 / xHarbour Simplex 1.2.3 / BCC73 / Pelles C / UEStudio
FWPPC 10.02 / Harbour for PPC (FTDN)
ADS V.9 / MySql / MariaDB
R&R 12 Infinity / Crystal Report XI R2
(Thailand)