MariaDB BlankRow() returns with additional ... (SOLVED)
MariaDB BlankRow() returns with additional ... (SOLVED)
Hi All,
When calling oRs:oChild:BlankRow() then lenght of array doesn't match with fields of oRs:AddChild( 'table' ).
say: The table has 11 columns, then, calling oRs:oChild:BlankRow() it returns 12 elements..
When calling oRs:oChild:BlankRow() then lenght of array doesn't match with fields of oRs:AddChild( 'table' ).
say: The table has 11 columns, then, calling oRs:oChild:BlankRow() it returns 12 elements..
Last edited by fraxzi on Sat Jun 09, 2018 1:37 am, edited 1 time in total.
Kind Regards,
Frances
Fivewin for xHarbour v18.07
xHarbour v1.2.3.x
BCC 7.3 + PellesC8 ( Resource Compiler only)
ADS 10.1 / MariaDB
Crystal Reports 8.5/9.23 DE
xMate v1.15
Frances
Fivewin for xHarbour v18.07
xHarbour v1.2.3.x
BCC 7.3 + PellesC8 ( Resource Compiler only)
ADS 10.1 / MariaDB
Crystal Reports 8.5/9.23 DE
xMate v1.15
- nageswaragunupudi
- Posts: 10729
- Joined: Sun Nov 19, 2006 5:22 am
- Location: India
- Been thanked: 10 times
- Contact:
Re: MariaDB BlankRow() returns with additional element/field
1) The extra element is serial number and is internally used.
2) Actually, method BlankRow is internally used and not to be directly used in the application program. I agree we used it in mariainv.prg sample. We will revise it.
For appending a row, please do one of the two:
1.
oRs:Append()
< fill field data >
oRs:Save()
2.
oRec := oRs:Record( .t. ) // .t. for new recor
<fill field data or edit field data>
oRec:Save()
Please do not use any other method.
2) Actually, method BlankRow is internally used and not to be directly used in the application program. I agree we used it in mariainv.prg sample. We will revise it.
For appending a row, please do one of the two:
1.
oRs:Append()
< fill field data >
oRs:Save()
2.
oRec := oRs:Record( .t. ) // .t. for new recor
<fill field data or edit field data>
oRec:Save()
Please do not use any other method.
Regards
G. N. Rao.
Hyderabad, India
G. N. Rao.
Hyderabad, India
Re: MariaDB BlankRow() returns with additional element/field
Hi Rao,
Actually, I am fallowing the sample "MariaInv.Prg" .. I require blank row from a oRs:oChild to an array to be used in xbrowse... very much similar to the sample provided.
Actually, I am fallowing the sample "MariaInv.Prg" .. I require blank row from a oRs:oChild to an array to be used in xbrowse... very much similar to the sample provided.
Kind Regards,
Frances
Fivewin for xHarbour v18.07
xHarbour v1.2.3.x
BCC 7.3 + PellesC8 ( Resource Compiler only)
ADS 10.1 / MariaDB
Crystal Reports 8.5/9.23 DE
xMate v1.15
Frances
Fivewin for xHarbour v18.07
xHarbour v1.2.3.x
BCC 7.3 + PellesC8 ( Resource Compiler only)
ADS 10.1 / MariaDB
Crystal Reports 8.5/9.23 DE
xMate v1.15
- nageswaragunupudi
- Posts: 10729
- Joined: Sun Nov 19, 2006 5:22 am
- Location: India
- Been thanked: 10 times
- Contact:
Re: MariaDB BlankRow() returns with additional element/field
Use autoappend feature
Or, explain your requirement, we will provide sample.
Or, explain your requirement, we will provide sample.
Regards
G. N. Rao.
Hyderabad, India
G. N. Rao.
Hyderabad, India
Re: MariaDB BlankRow() returns with additional element/field
nageswaragunupudi wrote:Use autoappend feature
Or, explain your requirement, we will provide sample.
Hi Mr. Rao,
I added MariaDB parent-child based on "mariainv,prg" sample .. I reconstruct from array to oRs:oChild:lAutoAppend but when parent oRs are :requery with oRs:SyncChild() and refresh the xBrowse oRs:oChild, the display not refreshed().
Kind Regards,
Frances
Fivewin for xHarbour v18.07
xHarbour v1.2.3.x
BCC 7.3 + PellesC8 ( Resource Compiler only)
ADS 10.1 / MariaDB
Crystal Reports 8.5/9.23 DE
xMate v1.15
Frances
Fivewin for xHarbour v18.07
xHarbour v1.2.3.x
BCC 7.3 + PellesC8 ( Resource Compiler only)
ADS 10.1 / MariaDB
Crystal Reports 8.5/9.23 DE
xMate v1.15
Re: MariaDB BlankRow() returns with additional element/field
Mr. Rao,
I got it!
oRs:ReSync()
oRs:SyncChild()
refreshes the oRs:oChild...

I got it!
oRs:ReSync()
oRs:SyncChild()
refreshes the oRs:oChild...

Kind Regards,
Frances
Fivewin for xHarbour v18.07
xHarbour v1.2.3.x
BCC 7.3 + PellesC8 ( Resource Compiler only)
ADS 10.1 / MariaDB
Crystal Reports 8.5/9.23 DE
xMate v1.15
Frances
Fivewin for xHarbour v18.07
xHarbour v1.2.3.x
BCC 7.3 + PellesC8 ( Resource Compiler only)
ADS 10.1 / MariaDB
Crystal Reports 8.5/9.23 DE
xMate v1.15
- nageswaragunupudi
- Posts: 10729
- Joined: Sun Nov 19, 2006 5:22 am
- Location: India
- Been thanked: 10 times
- Contact:
Re: MariaDB BlankRow() returns with additional element/field
May I know under what circumstances do you Requery the main rowset? You must be already aware that as far as possible, Requery should be avoided because it is time consuming and increases load on server and network
Regards
G. N. Rao.
Hyderabad, India
G. N. Rao.
Hyderabad, India
Re: MariaDB BlankRow() returns with additional element/field
nageswaragunupudi wrote:May I know under what circumstances do you Requery the main rowset? You must be already aware that as far as possible, Requery should be avoided because it is time consuming and increases load on server and network
Mr. Rao,
I load a single record from database from user selection.. each selection (cycle) it loads the record of the parent.
1. using oRs:Rowset( cSql, {'param'}) to init the oRs, and adds child using oRs:AddChild('table') with (:oChild:lAutoAppend := .T.
2. oRs:Append() when user define new entry and oRs:SyncChild() to refresh xBrowse.. the datasource not refreshed here.. it displays previous loaded data

3. oRs:Requery( {'param'} ) to load saved entry and oRs:SyncChild() to refresh xBrowse.. no issue here as it displays the saved records.

Kind Regards,
Frances
Fivewin for xHarbour v18.07
xHarbour v1.2.3.x
BCC 7.3 + PellesC8 ( Resource Compiler only)
ADS 10.1 / MariaDB
Crystal Reports 8.5/9.23 DE
xMate v1.15
Frances
Fivewin for xHarbour v18.07
xHarbour v1.2.3.x
BCC 7.3 + PellesC8 ( Resource Compiler only)
ADS 10.1 / MariaDB
Crystal Reports 8.5/9.23 DE
xMate v1.15
Re: MariaDB BlankRow() returns with additional element/field
Hi Rao,
Strangely, I put the oRs := oCn:RowSet( cSql, {'param'} ) on my init variable function (as once-only declaration) and put oRs:Append() | oRs:SyncChild() | oBrw:Refresh()...
This way it SOLVED my issues refreshing oRs:oChild datasource of xBrowse ...
Moving forward to another task...

Strangely, I put the oRs := oCn:RowSet( cSql, {'param'} ) on my init variable function (as once-only declaration) and put oRs:Append() | oRs:SyncChild() | oBrw:Refresh()...
This way it SOLVED my issues refreshing oRs:oChild datasource of xBrowse ...
Moving forward to another task...

Kind Regards,
Frances
Fivewin for xHarbour v18.07
xHarbour v1.2.3.x
BCC 7.3 + PellesC8 ( Resource Compiler only)
ADS 10.1 / MariaDB
Crystal Reports 8.5/9.23 DE
xMate v1.15
Frances
Fivewin for xHarbour v18.07
xHarbour v1.2.3.x
BCC 7.3 + PellesC8 ( Resource Compiler only)
ADS 10.1 / MariaDB
Crystal Reports 8.5/9.23 DE
xMate v1.15
- nageswaragunupudi
- Posts: 10729
- Joined: Sun Nov 19, 2006 5:22 am
- Location: India
- Been thanked: 10 times
- Contact:
Re: MariaDB BlankRow() returns with additional ... (SOLVED)
Are you using MySql server or MariaDB server? If so, may I know your server version?
You can use
? oCn:cServerInfo
You can use
? oCn:cServerInfo
Regards
G. N. Rao.
Hyderabad, India
G. N. Rao.
Hyderabad, India
Re: MariaDB BlankRow() returns with additional ... (SOLVED)
nageswaragunupudi wrote:Are you using MySql server or MariaDB server? If so, may I know your server version?
You can use
? oCn:cServerInfo
Hi Mr. Rao,

Kind Regards,
Frances
Fivewin for xHarbour v18.07
xHarbour v1.2.3.x
BCC 7.3 + PellesC8 ( Resource Compiler only)
ADS 10.1 / MariaDB
Crystal Reports 8.5/9.23 DE
xMate v1.15
Frances
Fivewin for xHarbour v18.07
xHarbour v1.2.3.x
BCC 7.3 + PellesC8 ( Resource Compiler only)
ADS 10.1 / MariaDB
Crystal Reports 8.5/9.23 DE
xMate v1.15
- nageswaragunupudi
- Posts: 10729
- Joined: Sun Nov 19, 2006 5:22 am
- Location: India
- Been thanked: 10 times
- Contact:
Re: MariaDB BlankRow() returns with additional ... (SOLVED)
Can not see the image of your version.
Please post the version info
Please post the version info
Regards
G. N. Rao.
Hyderabad, India
G. N. Rao.
Hyderabad, India
Re: MariaDB BlankRow() returns with additional ... (SOLVED)
nageswaragunupudi wrote:Can not see the image of your version.
Please post the version info
I was using MariaDB v10.2.15 ... I upgraded to 10.3.7 during the Philippine Holiday ...
Kind Regards,
Frances
Fivewin for xHarbour v18.07
xHarbour v1.2.3.x
BCC 7.3 + PellesC8 ( Resource Compiler only)
ADS 10.1 / MariaDB
Crystal Reports 8.5/9.23 DE
xMate v1.15
Frances
Fivewin for xHarbour v18.07
xHarbour v1.2.3.x
BCC 7.3 + PellesC8 ( Resource Compiler only)
ADS 10.1 / MariaDB
Crystal Reports 8.5/9.23 DE
xMate v1.15
- nageswaragunupudi
- Posts: 10729
- Joined: Sun Nov 19, 2006 5:22 am
- Location: India
- Been thanked: 10 times
- Contact:
Re: MariaDB BlankRow() returns with additional ... (SOLVED)
Glad to know you are using MariaDB server instead of MySql server.
Regards
G. N. Rao.
Hyderabad, India
G. N. Rao.
Hyderabad, India