ADO RDD xHarbour
Re: ADO RDD xHarbour
Antonio,
It seems that in usrrdd.c are missing some functions like FieldSize FieldLen Dbrlocklist.
Shouldnt these also be there?
It seems that in usrrdd.c are missing some functions like FieldSize FieldLen Dbrlocklist.
Shouldnt these also be there?
Regards
Antonio H Ferreira
Antonio H Ferreira
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Re: ADO RDD xHarbour
It does nothing but it is needed. In case that you need it to do something, then you can implement it.AHF wrote:Antonio,
What this needed for:
Code: Select all
STATIC FUNCTION ADO_RAWLOCK( nWA, nAction, nRecNo ) // LOCAL oRecordSet := USRRDD_AREADATA( nWA )[ WA_RECORDSET ] /* TODO */ HB_SYMBOL_UNUSED( nRecNo ) HB_SYMBOL_UNUSED( nWA ) HB_SYMBOL_UNUSED( nAction ) RETURN HB_SUCCESS
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Re: ADO RDD xHarbour
Antonio,
You should download the complete source code for the harbour RDDs and use it to review the RDD code:
https://github.com/harbour/core/tree/master/src/rdd
You should download the complete source code for the harbour RDDs and use it to review the RDD code:
https://github.com/harbour/core/tree/master/src/rdd
Re: ADO RDD xHarbour
Antonio,
I dont have any c expert and even so it would be dificult to understand it without proper documentation.
In order to proceed I need the following functions working:
OrdFor()
FieldSize() or FieldLen()
FieldDec()
DbrlockList()
I'm in a dead end ! What do you propose?
I dont have any c expert and even so it would be dificult to understand it without proper documentation.
In order to proceed I need the following functions working:
OrdFor()
FieldSize() or FieldLen()
FieldDec()
DbrlockList()
I'm in a dead end ! What do you propose?
Regards
Antonio H Ferreira
Antonio H Ferreira
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Re: ADO RDD xHarbour
Antonio,
Its not a matter of knowing C, instead it is a matter of properly searching
You asked for OrdFor().
1. Is there a UR_FOR or similar in harbour\include\hbusrrdd.ch ?
I find this:
/* DBSCOPEINFO */
#define UR_SI_BFOR 1
#define UR_SI_CFOR 2
Also:
/* DBORDERCONDINFO */
#define UR_ORC_ACTIVE 1
#define UR_ORC_CFOR 2
2. Have we implemented those functions in adordd.prg ?
3. In SQL we may need to store a string cFor value only, no need for the codeblock.
I know this is not easy, but slowly we can keep going...
Its not a matter of knowing C, instead it is a matter of properly searching
You asked for OrdFor().
1. Is there a UR_FOR or similar in harbour\include\hbusrrdd.ch ?
I find this:
/* DBSCOPEINFO */
#define UR_SI_BFOR 1
#define UR_SI_CFOR 2
Also:
/* DBORDERCONDINFO */
#define UR_ORC_ACTIVE 1
#define UR_ORC_CFOR 2
2. Have we implemented those functions in adordd.prg ?
3. In SQL we may need to store a string cFor value only, no need for the codeblock.
I know this is not easy, but slowly we can keep going...
Re: ADO RDD xHarbour
Antonio,
If the index is created (temporary) then on ADO_CREATE we have all info we just save it for later use.
If the index its usual then it must be defined previously in the index array.
So the problem its only with ordfor() to get the values saved.
I can have such a function(s) but then I will disrupt other linked rdds, besides that since we dont have nWA we can not use it like (alias)->(ordfor(2))
I think all mentioned functions must be defined at rdd level to be used correctly as they probably are in dbfcdx rdd for ex.
The adordd its working already with "indexes" with zero app code change and if you get an error you will have all area info.
Dont get me wrong its not a matter of difficulty but if its in fact possible to work with our approach idea and that we are not simply loosing time as we are trying to join together two completly diferent worlds xBase and SQL.
Besides that we have till June to have such a solution.
Is there some rdd expert that could help us? How can we solve this? Can you check how its working in other rdds?
As far as I see no.1. Is there a UR_FOR or similar in harbour\include\hbusrrdd.ch ?
Its absolutly necessary to build the selects respecting indexes order and conditions.3. In SQL we may need to store a string cFor value only, no need for the codeblock.
If the index is created (temporary) then on ADO_CREATE we have all info we just save it for later use.
If the index its usual then it must be defined previously in the index array.
So the problem its only with ordfor() to get the values saved.
What do you mean by those functions ?2. Have we implemented those functions in adordd.prg ?
I can have such a function(s) but then I will disrupt other linked rdds, besides that since we dont have nWA we can not use it like (alias)->(ordfor(2))
Code: Select all
FUNCTION OrdFor(nOrder)
//works only for current selected workarea not alias->(ordfor(n))
LOCAL cTablename := USRRDD_AREADATA( Select() )[ WA_TABLENAME ]
LOCAL aWAData := USRRDD_AREADATA( Select() )
LOCAL cFor := ""
IF nOrder = 0
nOrder := aWAData[WA_INDEXACTIVE]
cFor := aWAData[WA_INDEXFOR][nOrder]
ELSEIF nOrder <= LEN(aWAData[WA_INDEXES] )
cFor := aWAData[WA_INDEXFOR][nOrder]
ENDIF
RETURN cFor
The adordd its working already with "indexes" with zero app code change and if you get an error you will have all area info.
Code: Select all
20: ENCCLIST NomeRDD: ADORDD
==============================
RecNo RecCount BOF EOF
1 34 .F. .F.
Índices em uso TagName
=> NRENCOMEND+CODIGOPROD+ARMAZEM ENCCPRO
CODIGOPROD+ARMAZEM+NRENCOMEND PROENCC
GUIA+CODCLIENTE+CODIGOPROD+ARMAZEM MECPD
CODCLIENTE CDENCCL
NRFACTUR+CODCLIENTE+CODIGOPROD+ARMA PTFACT
NRFACTUR+CODIGOPROD+ARMAZEM+ANO +SE NRFPROD
CODIGOPROD+NRCONTRATO CCONTRT
Relações em uso
Registos fechados
30: => OFERTAS NomeRDD: ADORDD
==============================
RecNo RecCount BOF EOF
1 3 .F. .F.
Índices em uso TagName
CODCLIENTE+CODIGOPROD+ARMAZEM+DATAO CLIPRO
CODIGOPROD+ARMAZEM+CODCLIENTE+DATAO PROCLI
CODCLIENTE+DATAOFERTA +NUMEROOFER+C CLIPRO2
CODIGOPROD+ARMAZEM+DATAOFERTA +NUME PROCLI2
=> CODCLIENTE TEMP2
Relações em uso
Registos fechados
Besides that we have till June to have such a solution.
Is there some rdd expert that could help us? How can we solve this? Can you check how its working in other rdds?
Regards
Antonio H Ferreira
Antonio H Ferreira
Re: ADO RDD xHarbour
Antonio,
I never looked at .ch.
I understand now how it works.
Ive define UR_INFO and now I get the call from dbrlocklist do get the array.
We re back again
I never looked at .ch.
I understand now how it works.
Ive define UR_INFO and now I get the call from dbrlocklist do get the array.
We re back again
Regards
Antonio H Ferreira
Antonio H Ferreira
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Re: ADO RDD xHarbour
Antonio,
if you post here or provide a url to download your most recent version, I guess many users may be interested
in testing it and surely will provide a great feedback
if you post here or provide a url to download your most recent version, I guess many users may be interested
in testing it and surely will provide a great feedback
Re: ADO RDD xHarbour
Antonio,
Ill do that maybe today after finish all locking, seeks and finds.
Dbrlocklist() and Dbinfo() are working
.
Ive checked the paramaters in hbusrdd.c
Can I assume that when we have pSomeVar its always a pointer thus passed by reference?
Thus in this case ADO_ORDERINFO(nWa, nInfo, uReturn) uReturn passed reference
The Recno() only works with :Bookmarks as:
The commented line was in previous adordd but I think its safer like this. Do you agree?
Ill do that maybe today after finish all locking, seeks and finds.
Dbrlocklist() and Dbinfo() are working
.
Ive checked the paramaters in hbusrdd.c
Code: Select all
hb_usrInfo( AREAP pArea, HB_USHORT uiInfoType, PHB_ITEM pInfo )
Thus in this case ADO_ORDERINFO(nWa, nInfo, uReturn) uReturn passed reference
The Recno() only works with :Bookmarks as:
Code: Select all
nRecno := oRecordSet:BookMark
// iif( oRecordSet:AbsolutePosition == -3, oRecordSet:RecordCount() + 1, oRecordSet:AbsolutePosition )
Regards
Antonio H Ferreira
Antonio H Ferreira
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Re: ADO RDD xHarbour
Antonio,
yes I think it is fine.
You are doing a great work, congratulations!
yes I think it is fine.
You are doing a great work, congratulations!
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Re: ADO RDD xHarbour
Once you complete it, you could provide it to Harbour dev team so it will get updated in the Harbour official repository
and you will become an official Harbour contributor
and you will become an official Harbour contributor
Re: ADO RDD xHarbour
Antonio,
In order to finish network and concurrent activity I need to work with transactions.
For that I need to know if in ADORDD each time we open a new recordset its in the same connection.
Its crucial to know this because transactions are per connection.
Do you have any idea how to test that?
In order to finish network and concurrent activity I need to work with transactions.
For that I need to know if in ADORDD each time we open a new recordset its in the same connection.
Its crucial to know this because transactions are per connection.
Do you have any idea how to test that?
Regards
Antonio H Ferreira
Antonio H Ferreira
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Re: ADO RDD xHarbour
Antonio,
AS far as I know I would say yes, but Mr. Rao is the right one to confirm us this
AS far as I know I would say yes, but Mr. Rao is the right one to confirm us this
Re: ADO RDD xHarbour
Antonio,
Ive already ask him in my oyher post ADO exclusive open.
It seems that in the source of tdatarow we could check that.
Ive already ask him in my oyher post ADO exclusive open.
It seems that in the source of tdatarow we could check that.
Regards
Antonio H Ferreira
Antonio H Ferreira