ADO RDD xHarbour
Re: ADO RDD xHarbour
Lucas,
Ok I see it. Im using xHarbour Set 2008.
How can we call it correctly?
Ok I see it. Im using xHarbour Set 2008.
How can we call it correctly?
Regards
Antonio H Ferreira
Antonio H Ferreira
Re: ADO RDD xHarbour
Done!
Code: Select all | Expand
oRecordSet:Fields( aWAData[WA_FIELDRECNO] ):Properties():Item("Optimize"):Value := 1
Regards
Antonio H Ferreira
Antonio H Ferreira
- lucasdebeltran
- Posts: 1303
- Joined: Tue Jul 21, 2009 8:12 am
- Contact:
Re: ADO RDD xHarbour
Antonio,
Dbcreate() should take the database from SET ADO DEFAULT DATABASE TO command, so only needs to indicate table name, as current dbcreate() from DBFCDX.
So, I would plan dbcreate() as follows.
To keep compatibility with DBFCDX, fist parameter should be table name.
Also, if you want, you can indicate separated by ; the rest of the parameters:
STATIC FUNCTION ADO_CREATE( nWA, aOpenInfo )
LOCAL aWAData := USRRDD_AREADATA( nWA )
LOCAL cTable := hb_tokenGet( aOpenInfo[ UR_OI_NAME ], 1, ";" )
LOCAL cDataBase := hb_tokenGet( aOpenInfo[ UR_OI_NAME ], 2, ";" )
LOCAL cDbEngine := hb_tokenGet( aOpenInfo[ UR_OI_NAME ], 3, ";" )
LOCAL cServer := hb_tokenGet( aOpenInfo[ UR_OI_NAME ], 4, ";" )
LOCAL cUserName := hb_tokenGet( aOpenInfo[ UR_OI_NAME ], 5, ";" )
LOCAL cPassword := hb_tokenGet( aOpenInfo[ UR_OI_NAME ], 6, ";" )
I discovered a new bug: creating an empty Access database and table, I can´t add records. I get MsgAlert() ADO ERROR UNKNOWN at function ADO_APPEND().
If I edit the Access and I add with Access a new record, I can APPEND new records with ADORDD.
Thank you.
Dbcreate() should take the database from SET ADO DEFAULT DATABASE TO command, so only needs to indicate table name, as current dbcreate() from DBFCDX.
So, I would plan dbcreate() as follows.
To keep compatibility with DBFCDX, fist parameter should be table name.
Also, if you want, you can indicate separated by ; the rest of the parameters:
STATIC FUNCTION ADO_CREATE( nWA, aOpenInfo )
LOCAL aWAData := USRRDD_AREADATA( nWA )
LOCAL cTable := hb_tokenGet( aOpenInfo[ UR_OI_NAME ], 1, ";" )
LOCAL cDataBase := hb_tokenGet( aOpenInfo[ UR_OI_NAME ], 2, ";" )
LOCAL cDbEngine := hb_tokenGet( aOpenInfo[ UR_OI_NAME ], 3, ";" )
LOCAL cServer := hb_tokenGet( aOpenInfo[ UR_OI_NAME ], 4, ";" )
LOCAL cUserName := hb_tokenGet( aOpenInfo[ UR_OI_NAME ], 5, ";" )
LOCAL cPassword := hb_tokenGet( aOpenInfo[ UR_OI_NAME ], 6, ";" )
I discovered a new bug: creating an empty Access database and table, I can´t add records. I get MsgAlert() ADO ERROR UNKNOWN at function ADO_APPEND().
If I edit the Access and I add with Access a new record, I can APPEND new records with ADORDD.
Thank you.
Muchas gracias. Many thanks.
Un saludo, Best regards,
Harbour 3.2.0dev, Borland C++ 5.82 y FWH 13.06 [producción]
Implementando MSVC 2010, FWH64 y ADO.
Abandonando uso xHarbour y SQLRDD.
Un saludo, Best regards,
Harbour 3.2.0dev, Borland C++ 5.82 y FWH 13.06 [producción]
Implementando MSVC 2010, FWH64 y ADO.
Abandonando uso xHarbour y SQLRDD.
- Enrico Maria Giordano
- Posts: 8738
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Has thanked: 1 time
- Been thanked: 2 times
- Contact:
Re: ADO RDD xHarbour
Antonio,
A version 7 years old! Time to update!![Smile :-)](./images/smilies/icon_smile.gif)
EMG
AHF wrote:Im using xHarbour Set 2008.
A version 7 years old! Time to update!
![Smile :-)](./images/smilies/icon_smile.gif)
EMG
Re: ADO RDD xHarbour
lucasdebeltran wrote:Antonio,
Dbcreate() should take the database from SET ADO DEFAULT DATABASE TO command, so only needs to indicate table name, as current dbcreate() from DBFCDX.
So, I would plan dbcreate() as follows.
To keep compatibility with DBFCDX, fist parameter should be table name.
Also, if you want, you can indicate separated by ; the rest of the parameters:
STATIC FUNCTION ADO_CREATE( nWA, aOpenInfo )
LOCAL aWAData := USRRDD_AREADATA( nWA )
LOCAL cTable := hb_tokenGet( aOpenInfo[ UR_OI_NAME ], 1, ";" )
LOCAL cDataBase := hb_tokenGet( aOpenInfo[ UR_OI_NAME ], 2, ";" )
LOCAL cDbEngine := hb_tokenGet( aOpenInfo[ UR_OI_NAME ], 3, ";" )
LOCAL cServer := hb_tokenGet( aOpenInfo[ UR_OI_NAME ], 4, ";" )
LOCAL cUserName := hb_tokenGet( aOpenInfo[ UR_OI_NAME ], 5, ";" )
LOCAL cPassword := hb_tokenGet( aOpenInfo[ UR_OI_NAME ], 6, ";" )
I agree. Changes will be made in the next post.
I discovered a new bug: creating an empty Access database and table, I can´t add records. I get MsgAlert() ADO ERROR UNKNOWN at function ADO_APPEND().
If I edit the Access and I add with Access a new record, I can APPEND new records with ADORDD.
Sorry I know that's due to our trials in ADO_LOCK because of concurrent access control.
We must be sure that we have the recordset with most recent table information (new and deleted records included).
Thanks for your support
Regards
Antonio H Ferreira
Antonio H Ferreira
Re: ADO RDD xHarbour
Antonio,
First trials on real world went very well.
Trials will continue during this week.
Still didn't change one line of code in the app.
The only problem found its concerning performance of DBEVAL that translates to ADO_EVALBLOCK.
It takes an "eternity" to run. Something is wrong.
I m passing to UR_SUPER_EVALBLOCK otherwise I loose bBlock value.
How can I get the rest of the parameters of this function ?
[<bForCondition>] , ;
[<bWhileCondition>], ;
[<nNextRecords>] , ;
[<nRecord>] , ;
[<lRest>]
There must be a function call by UR_SUPER_EVALBLOCK where all parameters are saved.
First trials on real world went very well.
Trials will continue during this week.
Still didn't change one line of code in the app.
![Very Happy :D](./images/smilies/icon_biggrin.gif)
The only problem found its concerning performance of DBEVAL that translates to ADO_EVALBLOCK.
It takes an "eternity" to run. Something is wrong.
Code: Select all | Expand
STATIC FUNCTION ADO_EVALBLOCK( nArea, bBlock, uResult )
LOCAL nCurrArea
nCurrArea := Select()
IF nCurrArea != nArea
dbSelectArea( nArea )
ELSE
nCurrArea := 0
ENDIF
IF PROCNAME(1) <> "ADO_RELEVAL"
// DONT KNOW WHY BUT DBEVAL ONLY WORK LIKE THIS
//uResult := Eval( bBlock )
UR_SUPER_EVALBLOCK( nArea, bBlock, uResult )
ELSE
uResult := Eval( bBlock )
ENDIF
IF nCurrArea > 0
dbSelectArea( nCurrArea )
ENDIF
RETURN HB_SUCCESS
I m passing to UR_SUPER_EVALBLOCK otherwise I loose bBlock value.
How can I get the rest of the parameters of this function ?
[<bForCondition>] , ;
[<bWhileCondition>], ;
[<nNextRecords>] , ;
[<nRecord>] , ;
[<lRest>]
There must be a function call by UR_SUPER_EVALBLOCK where all parameters are saved.
Regards
Antonio H Ferreira
Antonio H Ferreira
- Enrico Maria Giordano
- Posts: 8738
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Has thanked: 1 time
- Been thanked: 2 times
- Contact:
Re: ADO RDD xHarbour
Antonio,
Can we use something like this?
EMG
AHF wrote:First trials on real world went very well.
Trials will continue during this week.
Still didn't change one line of code in the app.![]()
Can we use something like this?
Code: Select all | Expand
INDEX ON MYFUNC1( myparams ) TO MYINDEX FOR MYFUNC2( myparams )
EMG
Re: ADO RDD xHarbour
Enrico Maria Giordano wrote:Antonio,AHF wrote:First trials on real world went very well.
Trials will continue during this week.
Still didn't change one line of code in the app.![]()
Can we use something like this?Code: Select all | Expand
INDEX ON MYFUNC1( myparams ) TO MYINDEX FOR MYFUNC2( myparams )
EMG
Enrico,
As long as its evaluated before send it to adordd I would say yes.
Ex.
Code: Select all | Expand
cexpress1 := "field1 <> space(10)"
cexpress2 := "field2+field3 ='"+ (wcod)+"'"
index on field2+field3+str(val(field4),4,0) to (temporario);
while &(cexpress2) for &(cexpress1);
Please note that this is the only exception where you need to change code.
Check readme at github.
Fortunately the app we are adapting was working already with ADS thus this has already been done in the past.
Regards
Antonio H Ferreira
Antonio H Ferreira
- Enrico Maria Giordano
- Posts: 8738
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Has thanked: 1 time
- Been thanked: 2 times
- Contact:
Re: ADO RDD xHarbour
Antonio,
No, they can't be evaluated in advance. So ADORDD is of no use for me.![Sad :-(](./images/smilies/icon_sad.gif)
EMG
AHF wrote:As long as its evaluated before send it to adordd I would say yes.
No, they can't be evaluated in advance. So ADORDD is of no use for me.
![Sad :-(](./images/smilies/icon_sad.gif)
EMG
Re: ADO RDD xHarbour
Enrico,
I regret
Cant you work also with ADS?
Cant you somehow translated to a SQL SELECT ?
I regret
![Sad :(](./images/smilies/icon_sad.gif)
Cant you work also with ADS?
Cant you somehow translated to a SQL SELECT ?
Regards
Antonio H Ferreira
Antonio H Ferreira
- Enrico Maria Giordano
- Posts: 8738
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Has thanked: 1 time
- Been thanked: 2 times
- Contact:
- lucasdebeltran
- Posts: 1303
- Joined: Tue Jul 21, 2009 8:12 am
- Contact:
Re: ADO RDD xHarbour
Antonio,
Have you been able to fix the APPEND bug?.
Thank you.
Have you been able to fix the APPEND bug?.
Thank you.
Muchas gracias. Many thanks.
Un saludo, Best regards,
Harbour 3.2.0dev, Borland C++ 5.82 y FWH 13.06 [producción]
Implementando MSVC 2010, FWH64 y ADO.
Abandonando uso xHarbour y SQLRDD.
Un saludo, Best regards,
Harbour 3.2.0dev, Borland C++ 5.82 y FWH 13.06 [producción]
Implementando MSVC 2010, FWH64 y ADO.
Abandonando uso xHarbour y SQLRDD.
Re: ADO RDD xHarbour
Enrico Maria Giordano wrote:Antonio,
No, to all your questions.
EMG
Enrico,
Can it work like this?
index on &( MyFunc( myparams ) ) TO TEMP1 FOR &( MyFunc2( myparams ) )
Regards
Antonio H Ferreira
Antonio H Ferreira
- lucasdebeltran
- Posts: 1303
- Joined: Tue Jul 21, 2009 8:12 am
- Contact:
Re: ADO RDD xHarbour
Antonio,
Thank you. Please ensure it works fine by deleting previously the database, and next create the database and its tables.
Also, I guess LOCATE FOR now works as DBFCDX:
In addition, SET ADO LOCK CONTROL SHAREPATH TO should asume by default HB_DIRBASE(). If the programmer does want to change the path, so it should call this command.
About the indexes, are SET ADO TABLES INDEX LIST TO and SET ADODBF TABLES INDEX LIST TO are both required?.
Thank you.
Thank you. Please ensure it works fine by deleting previously the database, and next create the database and its tables.
Also, I guess LOCATE FOR now works as DBFCDX:
Code: Select all | Expand
LOCATE FOR FIELD->NAME == "Lucas"
In addition, SET ADO LOCK CONTROL SHAREPATH TO should asume by default HB_DIRBASE(). If the programmer does want to change the path, so it should call this command.
About the indexes, are SET ADO TABLES INDEX LIST TO and SET ADODBF TABLES INDEX LIST TO are both required?.
Thank you.
Muchas gracias. Many thanks.
Un saludo, Best regards,
Harbour 3.2.0dev, Borland C++ 5.82 y FWH 13.06 [producción]
Implementando MSVC 2010, FWH64 y ADO.
Abandonando uso xHarbour y SQLRDD.
Un saludo, Best regards,
Harbour 3.2.0dev, Borland C++ 5.82 y FWH 13.06 [producción]
Implementando MSVC 2010, FWH64 y ADO.
Abandonando uso xHarbour y SQLRDD.