topic
stringlengths 1
63
| text
stringlengths 1
577k
⌀ |
|---|---|
ADO RDD xHarbour
|
Antonio,
Sorry my mistake index scopes almost finished <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D -->
Meanwhile I dont know what these functions are for and what calls them
#define UR_CLEARSCOPE 72
#define UR_COUNTSCOPE 73
#define UR_SCOPEINFO 75
#define UR_SETSCOPE 78
#define UR_SKIPSCOPE 79
Do you know?
Are these needed for somethinf Im missing it?
Thanks I received file by email.
|
ADO RDD xHarbour
|
Antonio,
Their names are quite self explanatories, anyhow place a MsgInfo() for each one in case they get called.
I don't think they will get called (I have been searching in Harbour rdds sources)
|
ADO RDD xHarbour
|
Antonio,
I already did msginfo without any result.
|
ADO RDD xHarbour
|
No problem, as I told you they are not used, and in case they are needed by a user, we can always implement them.
Keep going, we are quite close to have it <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
|
ADO RDD xHarbour
|
Antonio,
Thanks Im doing just that.
OrdScopes finnish will post it tomorrow <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D -->
Would be great if many people test it to find bugs
Tomorrow we will start with relations.
Do you or perhaps Mr Rao know if there is subrecorsets or datasets like in ado.net for this porpose or do we have to do everyting from scratch at the rdd level?
|
ADO RDD xHarbour
|
Antonio,
I just sent an email to Rao. He is the most advanced ADO developer that I know <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
|
ADO RDD xHarbour
|
Hello Antonio,
I am about to check your ADORDD and I would like to make you few questions please:
Which RDBMS are you using?.
How do you open a dbf?.
How do you create it?.
Do you use autoinc + fieldtype feature?.
Thank you.
|
ADO RDD xHarbour
|
Lucas,
[quote="AHF":3mmw8b7a]
Ready:
Open
Close
Indexes
Locks
Navigation
Find
dbinfo
ordinfo
Seek (without lSoftSeek)[/quote:3mmw8b7a]
[quote:3mmw8b7a]Which RDBMS are you using?.[/quote:3mmw8b7a]
Tests ADS (on real world Oracle or MySql)
[quote:3mmw8b7a]How do you open a dbf?.[/quote:3mmw8b7a]
normal USE cfile SHARED | EXLUSIVE...
Please note you must check ado_open and adjust it to your rdbms Its trial phase so its not yet prepared to receive any rdbms.
[quote:3mmw8b7a]How do you create it?. [/quote:3mmw8b7a]
Its not yet finnished.
We choose to check the possibility of our approach to start with the most difficult parts.
Create its easy and should not have any problem to code it but its not yet done.
[quote:3mmw8b7a]Do you use autoinc + fieldtype feature?.[/quote:3mmw8b7a]
Didnt test it yet.
Writing to files should be ok but didnt test yet.
What you can test are the work describe above as ready.
I will post now the last version with set scopes ready.
Next item will relations and only after we will go for Create, Replaces (although) should already work in the most part.
|
ADO RDD xHarbour
|
Antonio,
I dont have incremental search in my xbrowse.
Could email me only that function?
|
ADO RDD xHarbour
|
Antonio,
So APPEND BLANK and REPLACE FIELD WITH.. do not work already?.
Thank you.
|
ADO RDD xHarbour
|
Lucas,
It might work but those functions were already written by others and not fully tested.
In our small trials it worked but i cant assure.
Append blank seems to work.
|
ADO RDD xHarbour
|
Antonio,
I just sent an email to Rao asking him for the code to provide you
|
ADO RDD xHarbour
|
Antonio,
When trying to compile with Harbour 3.2.0dev (r1412151448), there are some errors:
lucas.prg(215) Warning W0001 Ambiguous reference 'CSTR'
lucas.prg(216) Warning W0001 Ambiguous reference 'CSTR'
lucas.prg(216) Warning W0001 Ambiguous reference 'CSTR'
lucas.prg(216) Warning W0001 Ambiguous reference 'CSTR'
lucas.prg(217) Warning W0001 Ambiguous reference 'CSTR'
lucas.prg(220) Warning W0001 Ambiguous reference 'CSTR'
lucas.prg(331) Warning W0001 Ambiguous reference 'UR_FI_FLAGS'
lucas.prg(332) Warning W0001 Ambiguous reference 'UR_FI_STEP'
lucas.prg(759) Warning W0001 Ambiguous reference 'N'
lucas.prg(760) Warning W0001 Ambiguous reference 'N'
lucas.prg(761) Warning W0001 Ambiguous reference 'N'
lucas.prg(932) Warning W0001 Ambiguous reference 'N'
lucas.prg(934) Warning W0001 Ambiguous reference 'N'
lucas.prg(937) Warning W0001 Ambiguous reference 'N'
lucas.prg(940) Warning W0001 Ambiguous reference 'N'
lucas.prg(947) Warning W0001 Ambiguous reference 'N'
lucas.prg(1092) Error E0030 Syntax error "syntax error at 'IN'"
lucas.prg(1108) Error E0030 Syntax error "syntax error at 'ENDIF'"
lucas.prg(1148) Error E0017 Unclosed control structure 'IF'
lucas.prg(1188) Error E0030 Syntax error "syntax error at 'IN'"
lucas.prg(1189) Warning W0001 Ambiguous reference 'Y'
lucas.prg(1191) Warning W0001 Ambiguous reference 'Y'
lucas.prg(1191) Warning W0001 Ambiguous reference 'Y'
lucas.prg(1194) Error E0030 Syntax error "syntax error at 'ELSE'"
lucas.prg(1198) Error E0030 Syntax error "syntax error at 'ENDIF'"
lucas.prg(1221) Error E0017 Unclosed control structure 'IF'
lucas.prg(1230) Warning W0001 Ambiguous reference 'WA_INDEXEFOR'
lucas.prg(1265) Warning W0001 Ambiguous reference 'CSQL'
lucas.prg(1266) Warning W0001 Ambiguous reference 'CSQL'
lucas.prg(1266) Warning W0001 Ambiguous reference 'CSQL'
lucas.prg(1268) Warning W0001 Ambiguous reference 'CSQL'
lucas.prg(1406) Warning W0001 Ambiguous reference 'YURETURN'
lucas.prg(1440) Warning W0001 Ambiguous reference 'URESULT'
lucas.prg(1444) Warning W0001 Ambiguous reference 'URESULT'
lucas.prg(1450) Warning W0001 Ambiguous reference 'URESULT'
lucas.prg(1452) Warning W0001 Ambiguous reference 'URESULT'
lucas.prg(1454) Warning W0001 Ambiguous reference 'URESULT'
lucas.prg(1488) Warning W0001 Ambiguous reference 'NLEN'
lucas.prg(1494) Warning W0001 Ambiguous reference 'NLEN'
lucas.prg(1501) Warning W0001 Ambiguous reference 'NLEN'
lucas.prg(1502) Warning W0001 Ambiguous reference 'NLEN'
lucas.prg(1506) Warning W0001 Ambiguous reference 'NLEN'
lucas.prg(1507) Warning W0001 Ambiguous reference 'NLEN'
lucas.prg(1517) Warning W0001 Ambiguous reference 'NLEN'
lucas.prg(1667) Warning W0001 Ambiguous reference 'HB_FT_DATETIME'
lucas.prg(1690) Error E0030 Syntax error "syntax error at 'IN'"
lucas.prg(1692) Error E0030 Syntax error "syntax error at 'ELSE'"
lucas.prg(1697) Error E0030 Syntax error "syntax error at 'ENDIF'"
lucas.prg(1705) Error E0017 Unclosed control structure 'IF'
|
ADO RDD xHarbour
|
Lucas,
[quote:15pjbq7f]
lucas.prg(331) Warning W0001 Ambiguous reference 'UR_FI_FLAGS'
lucas.prg(332) Warning W0001 Ambiguous reference 'UR_FI_STEP'[/quote:15pjbq7f]
These in xHarbour must be added to hbusrrd.ch
[code=fw:15pjbq7f]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#define</span> UR_FI_FLAGS <span style="color: #000000;">6</span><br /><span style="color: #00D7D7;">#define</span> UR_FI_STEP <span style="color: #000000;">7</span><br /><span style="color: #00D7D7;">#define</span> UR_FI_SIZE <span style="color: #000000;">7</span> <span style="color: #B900B9;">//eram 5 ahf </span><br /> </div>[/code:15pjbq7f]
If in harbour they are not needed comment them in ado_open.
All others Im correcting code I ll post it later. Nevertheless you should be able to run like that.
[code=fw:15pjbq7f]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">IF</span> UPPER<span style="color: #000000;">(</span><span style="color: #0000ff;">SUBSTR</span><span style="color: #000000;">(</span>cOrder,<span style="color: #000000;">1</span>,<span style="color: #000000;">3</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span> IN aTempFiles .OR. UPPER<span style="color: #000000;">(</span><span style="color: #0000ff;">SUBSTR</span><span style="color: #000000;">(</span>cOrder,<span style="color: #000000;">1</span>,<span style="color: #000000;">4</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span> IN aTempFiles</div>[/code:15pjbq7f]
I dont know if its only in xHarbour
|
ADO RDD xHarbour
|
Antonio,
Yes, please, code it compatible for both harbour and xharbour, thanks
|
ADO RDD xHarbour
|
Antonio,
I have emailed you the code you asked for <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
|
ADO RDD xHarbour
|
You re right Ill do that.
Thanks for the code Antonio.
|
ADO RDD xHarbour
|
Master Antonio Linares,
In order to help Antonio, what is the equivalent in Harbour for IF xxxx IN aTempFiles?.
Thanks.
|
ADO RDD xHarbour
|
Lucas,
ascan() > 0 but you have to inverse args
|
ADO RDD xHarbour
|
Antonio,
ORDSCOPE is always called in pairs 1st top 2nd bot.
Thus I think DBOI_SCOPESET and DBOI_SCOPECLEAR are never called.
In order to avoid build a query and open recordset one for TOP and another for BOT I only do that after DBOI_SCOPEBOTTOM is called.
Is this the correct behaviour to be compatible with dbf ordscope?
If one use SET SCOPE TO its ok but if use only one ordscope() to define top will go wrong! I think nobody does that but you never know.
If it comes with a codeblock can we do that?
What do you think about the code leave it like that?
[code=fw:2s0ra0sw]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">STATIC</span> <span style="color: #00C800;">FUNCTION</span> ADOSCOPE<span style="color: #000000;">(</span>aWAdata, oRecordSet, aOrderInfo,nIndex<span style="color: #000000;">)</span><br /> <span style="color: #00C800;">LOCAL</span> y, cScopeExp :=<span style="color: #ff0000;">""</span>, cSql :=<span style="color: #ff0000;">""</span><br /><br /> <span style="color: #B900B9;">//[UR_ORI_NEWVAL] comes with actual scope top or bottom and returns the former active scope if any</span><br /> <span style="color: #00C800;">IF</span> VALTYPE<span style="color: #000000;">(</span>aOrderInfo<span style="color: #000000;">[</span> UR_ORI_NEWVAL <span style="color: #000000;">]</span><span style="color: #000000;">)</span> = <span style="color: #ff0000;">"B"</span><br /> aOrderInfo<span style="color: #000000;">[</span> UR_ORI_NEWVAL <span style="color: #000000;">]</span> := EVAL<span style="color: #000000;">(</span>aOrderInfo<span style="color: #000000;">[</span> UR_ORI_NEWVAL <span style="color: #000000;">]</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">ENDIF</span><br /> <br /> <span style="color: #00C800;">IF</span> EMPTY<span style="color: #000000;">(</span>aWAdata<span style="color: #000000;">[</span>WA_INDEXACTIVE<span style="color: #000000;">]</span><span style="color: #000000;">)</span> .OR. aWAdata<span style="color: #000000;">[</span>WA_INDEXACTIVE<span style="color: #000000;">]</span> = <span style="color: #000000;">0</span> <span style="color: #B900B9;">//NO INDEX NO SCOPE</span><br /> aOrderInfo<span style="color: #000000;">[</span> UR_ORI_RESULT <span style="color: #000000;">]</span> := <span style="color: #00C800;">NIL</span><br /> <span style="color: #00C800;">RETURN</span> HB_FAILURE<br /> <span style="color: #00C800;">ENDIF</span><br /> <br /> y:=ASCAN<span style="color: #000000;">(</span> aWAData<span style="color: #000000;">[</span> WA_SCOPES <span style="color: #000000;">]</span>, aWAData<span style="color: #000000;">[</span>WA_INDEXACTIVE<span style="color: #000000;">]</span> <span style="color: #000000;">)</span><br /> <br /> <span style="color: #00C800;">DO</span> <span style="color: #00C800;">CASE</span><br /> <span style="color: #00C800;">CASE</span> nIndex == DBOI_SCOPESET <span style="color: #B900B9;">//never gets called noy tested might be completly wrong!</span><br /> <br /> <span style="color: #00C800;">IF</span> y > <span style="color: #000000;">0</span><br /> aWAData<span style="color: #000000;">[</span> WA_SCOPETOP <span style="color: #000000;">]</span><span style="color: #000000;">[</span>y<span style="color: #000000;">]</span> := aOrderInfo<span style="color: #000000;">[</span> UR_ORI_NEWVAL <span style="color: #000000;">]</span><br /> aWAData<span style="color: #000000;">[</span> WA_SCOPEBOT <span style="color: #000000;">]</span><span style="color: #000000;">[</span>y<span style="color: #000000;">]</span> := aOrderInfo<span style="color: #000000;">[</span> UR_ORI_NEWVAL <span style="color: #000000;">]</span><br /> <span style="color: #00C800;">ELSE</span><br /> AADD<span style="color: #000000;">(</span> aWAData<span style="color: #000000;">[</span> WA_SCOPES <span style="color: #000000;">]</span>,aWAData<span style="color: #000000;">[</span> WA_INDEXACTIVE <span style="color: #000000;">]</span><span style="color: #000000;">)</span><br /> AADD<span style="color: #000000;">(</span>aWAData<span style="color: #000000;">[</span> WA_SCOPETOP <span style="color: #000000;">]</span>,aOrderInfo<span style="color: #000000;">[</span> UR_ORI_NEWVAL <span style="color: #000000;">]</span><span style="color: #000000;">)</span><br /> AADD<span style="color: #000000;">(</span>aWAData<span style="color: #000000;">[</span> WA_SCOPEBOT <span style="color: #000000;">]</span>,aOrderInfo<span style="color: #000000;">[</span> UR_ORI_NEWVAL <span style="color: #000000;">]</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">ENDIF</span> <br /> aOrderInfo<span style="color: #000000;">[</span> UR_ORI_RESULT <span style="color: #000000;">]</span> := <span style="color: #00C800;">NIL</span><br /><br /> <span style="color: #00C800;">CASE</span> nIndex == DBOI_SCOPECLEAR <span style="color: #B900B9;">//never gets called noy tested might be completly wrong!</span><br /> <br /> <span style="color: #00C800;">IF</span> y > <span style="color: #000000;">0</span><br /> ADEL<span style="color: #000000;">(</span>aWAData<span style="color: #000000;">[</span> WA_SCOPES <span style="color: #000000;">]</span>,y,.T.<span style="color: #000000;">)</span><br /> ADEL<span style="color: #000000;">(</span>aWAData<span style="color: #000000;">[</span> WA_SCOPETOP <span style="color: #000000;">]</span>,y,.T.<span style="color: #000000;">)</span><br /> ADEL<span style="color: #000000;">(</span>aWAData<span style="color: #000000;">[</span> WA_SCOPEBOT <span style="color: #000000;">]</span>,y,.T.<span style="color: #000000;">)</span><br /> <span style="color: #00C800;">ENDIF</span> <br /> aOrderInfo<span style="color: #000000;">[</span> UR_ORI_RESULT <span style="color: #000000;">]</span> := <span style="color: #00C800;">NIL</span> <span style="color: #B900B9;">//RETURN ACUTAL SCOPETOP NIL IF NONE</span><br /><br /> <span style="color: #00C800;">CASE</span> nIndex == DBOI_SCOPETOP<br /><br /> <span style="color: #00C800;">IF</span> y > <span style="color: #000000;">0</span><br /> aOrderInfo<span style="color: #000000;">[</span> UR_ORI_RESULT <span style="color: #000000;">]</span> := aWAData<span style="color: #000000;">[</span> WA_SCOPETOP <span style="color: #000000;">]</span><span style="color: #000000;">[</span>y<span style="color: #000000;">]</span> <span style="color: #B900B9;">//RETURN ACTUALSCOPE TOP</span><br /> aWAData<span style="color: #000000;">[</span> WA_SCOPETOP <span style="color: #000000;">]</span><span style="color: #000000;">[</span>y<span style="color: #000000;">]</span> := aOrderInfo<span style="color: #000000;">[</span> UR_ORI_NEWVAL <span style="color: #000000;">]</span><br /> <span style="color: #00C800;">IF</span> LEN<span style="color: #000000;">(</span>aWAData<span style="color: #000000;">[</span> WA_SCOPEBOT <span style="color: #000000;">]</span><span style="color: #000000;">)</span> < y<br /> AADD<span style="color: #000000;">(</span>aWAData<span style="color: #000000;">[</span> WA_SCOPEBOT <span style="color: #000000;">]</span>,SPACE<span style="color: #000000;">(</span>LEN<span style="color: #000000;">(</span>CVALTOCHAR<span style="color: #000000;">(</span>aWAData<span style="color: #000000;">[</span> WA_SCOPETOP <span style="color: #000000;">]</span><span style="color: #000000;">[</span>y<span style="color: #000000;">]</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span> <span style="color: #B900B9;">//THERE INST STILL A SCOPEBOT ARRAYS MUST HAVE SAME LEN</span><br /> <span style="color: #00C800;">ENDIF</span> <br /> <span style="color: #00C800;">ELSE</span><br /> AADD<span style="color: #000000;">(</span>aWAData<span style="color: #000000;">[</span> WA_SCOPETOP <span style="color: #000000;">]</span>,aOrderInfo<span style="color: #000000;">[</span> UR_ORI_NEWVAL <span style="color: #000000;">]</span><span style="color: #000000;">)</span><br /> AADD<span style="color: #000000;">(</span>aWAData<span style="color: #000000;">[</span> WA_SCOPEBOT <span style="color: #000000;">]</span>,SPACE<span style="color: #000000;">(</span>LEN<span style="color: #000000;">(</span>CVALTOCHAR<span style="color: #000000;">(</span>aWAData<span style="color: #000000;">[</span> WA_SCOPETOP <span style="color: #000000;">]</span><span style="color: #000000;">[</span><span style="color: #000000;">1</span><span style="color: #000000;">]</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span> <span style="color: #B900B9;">//THERE INST STILL A SCOPEBOT ARRAYS MUST HAVE SAME LEN</span><br /> aOrderInfo<span style="color: #000000;">[</span> UR_ORI_RESULT <span style="color: #000000;">]</span> := <span style="color: #ff0000;">""</span><br /> <span style="color: #00C800;">ENDIF</span> <br /> <br /> <span style="color: #00C800;">CASE</span> nIndex == DBOI_SCOPEBOTTOM<br /><br /> <span style="color: #00C800;">IF</span> y > <span style="color: #000000;">0</span><br /> aOrderInfo<span style="color: #000000;">[</span> UR_ORI_RESULT <span style="color: #000000;">]</span> := aWAData<span style="color: #000000;">[</span> WA_SCOPEBOT <span style="color: #000000;">]</span><span style="color: #000000;">[</span>y<span style="color: #000000;">]</span> <span style="color: #B900B9;">//RETURN ACTUALSCOPE TOP</span><br /> aWAData<span style="color: #000000;">[</span> WA_SCOPEBOT <span style="color: #000000;">]</span><span style="color: #000000;">[</span>y<span style="color: #000000;">]</span> := aOrderInfo<span style="color: #000000;">[</span> UR_ORI_NEWVAL <span style="color: #000000;">]</span><br /> <span style="color: #00C800;">IF</span> LEN<span style="color: #000000;">(</span>aWAData<span style="color: #000000;">[</span> WA_SCOPETOP <span style="color: #000000;">]</span><span style="color: #000000;">)</span> < y<br /> AADD<span style="color: #000000;">(</span>aWAData<span style="color: #000000;">[</span> WA_SCOPETOP <span style="color: #000000;">]</span>,SPACE<span style="color: #000000;">(</span>LEN<span style="color: #000000;">(</span>CVALTOCHAR<span style="color: #000000;">(</span>aWAData<span style="color: #000000;">[</span> WA_SCOPEBOT <span style="color: #000000;">]</span><span style="color: #000000;">[</span>y<span style="color: #000000;">]</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span> <span style="color: #B900B9;">//THERE INST STILL A SCOPETOP ARRAYS MUST HAVE SAME LEN</span><br /> <span style="color: #00C800;">ENDIF</span> <br /> <span style="color: #00C800;">ELSE</span><br /> AADD<span style="color: #000000;">(</span> aWAData<span style="color: #000000;">[</span> WA_SCOPES <span style="color: #000000;">]</span>,aWAData<span style="color: #000000;">[</span> WA_INDEXACTIVE <span style="color: #000000;">]</span><span style="color: #000000;">)</span><br /> AADD<span style="color: #000000;">(</span>aWAData<span style="color: #000000;">[</span> WA_SCOPEBOT <span style="color: #000000;">]</span>,aOrderInfo<span style="color: #000000;">[</span> UR_ORI_NEWVAL <span style="color: #000000;">]</span><span style="color: #000000;">)</span><br /> AADD<span style="color: #000000;">(</span>aWAData<span style="color: #000000;">[</span> WA_SCOPETOP <span style="color: #000000;">]</span>,SPACE<span style="color: #000000;">(</span>LEN<span style="color: #000000;">(</span>CVALTOCHAR<span style="color: #000000;">(</span>aWAData<span style="color: #000000;">[</span> WA_SCOPEBOT <span style="color: #000000;">]</span><span style="color: #000000;">[</span><span style="color: #000000;">1</span><span style="color: #000000;">]</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span> <span style="color: #B900B9;">//THERE INST STILL A SCOPETOP ARRAYS MUST HAVE SAME LEN</span><br /> aOrderInfo<span style="color: #000000;">[</span> UR_ORI_RESULT <span style="color: #000000;">]</span> := <span style="color: #ff0000;">""</span><br /> <span style="color: #00C800;">ENDIF</span> <br /><br /> <span style="color: #00C800;">CASE</span> nIndex == DBOI_SCOPETOPCLEAR<br /> <br /> <span style="color: #00C800;">IF</span> y > <span style="color: #000000;">0</span><br /> aOrderInfo<span style="color: #000000;">[</span> UR_ORI_RESULT <span style="color: #000000;">]</span> := aWAData<span style="color: #000000;">[</span> WA_SCOPETOP <span style="color: #000000;">]</span><span style="color: #000000;">[</span>y<span style="color: #000000;">]</span> <span style="color: #B900B9;">//RETURN ACTUALSCOPE TOP</span><br /> aWAData<span style="color: #000000;">[</span> WA_SCOPETOP <span style="color: #000000;">]</span><span style="color: #000000;">[</span>y<span style="color: #000000;">]</span> := SPACE<span style="color: #000000;">(</span>LEN<span style="color: #000000;">(</span>CVALTOCHAR<span style="color: #000000;">(</span>aWAData<span style="color: #000000;">[</span> WA_SCOPEBOT <span style="color: #000000;">]</span><span style="color: #000000;">[</span>y<span style="color: #000000;">]</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">ELSE</span><br /> aOrderInfo<span style="color: #000000;">[</span> UR_ORI_RESULT <span style="color: #000000;">]</span> := <span style="color: #ff0000;">""</span> <span style="color: #B900B9;">//RETURN ACTUALSCOPE TOP IF NONE</span><br /> <span style="color: #00C800;">ENDIF</span> <br /> <br /> <span style="color: #00C800;">CASE</span> nIndex == DBOI_SCOPEBOTTOMCLEAR<br /> <br /> <span style="color: #00C800;">IF</span> y > <span style="color: #000000;">0</span><br /> aOrderInfo<span style="color: #000000;">[</span> UR_ORI_RESULT <span style="color: #000000;">]</span> := aWAData<span style="color: #000000;">[</span> WA_SCOPEBOT <span style="color: #000000;">]</span><span style="color: #000000;">[</span>y<span style="color: #000000;">]</span> <span style="color: #B900B9;">//RETURN ACTUALSCOPE TOP</span><br /> aWAData<span style="color: #000000;">[</span> WA_SCOPEBOT <span style="color: #000000;">]</span><span style="color: #000000;">[</span>y<span style="color: #000000;">]</span> := SPACE<span style="color: #000000;">(</span>LEN<span style="color: #000000;">(</span>CVALTOCHAR<span style="color: #000000;">(</span>aWAData<span style="color: #000000;">[</span> WA_SCOPETOP <span style="color: #000000;">]</span><span style="color: #000000;">[</span>y<span style="color: #000000;">]</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">ELSE</span><br /> aOrderInfo<span style="color: #000000;">[</span> UR_ORI_RESULT <span style="color: #000000;">]</span> := <span style="color: #ff0000;">""</span> <span style="color: #B900B9;">//RETURN ACTUALSCOPE TOP IF NONE</span><br /> <span style="color: #00C800;">ENDIF</span> <br /><br /> <span style="color: #00C800;">ENDCASE</span><br /><br /> <span style="color: #B900B9;">//ONLY BUILDS QUERY AFTER ALL DONE ASSUME THAT ALWAYS CLLED IN PAIRS OTHERWISE WILL GET ERROR </span><br /> <span style="color: #00C800;">IF</span> nIndex = DBOI_SCOPEBOTTOM .OR. nIndex = DBOI_SCOPEBOTTOMCLEAR .OR. nIndex = DBOI_SCOPETOPCLEAR <br /> <br /> <span style="color: #00C800;">IF</span> y = <span style="color: #000000;">0</span> <span style="color: #B900B9;">//IF DIDNT FOUND ANY ITS THE FIRST ONE THAT JUST BEEN ADD</span><br /> y := <span style="color: #000000;">1</span><br /> <span style="color: #00C800;">ENDIF</span> <br /> <br /> <span style="color: #00C800;">IF</span> LEN<span style="color: #000000;">(</span>ALLTRIM<span style="color: #000000;">(</span>aWAData<span style="color: #000000;">[</span> WA_SCOPETOP <span style="color: #000000;">]</span><span style="color: #000000;">[</span>y<span style="color: #000000;">]</span>+aWAData<span style="color: #000000;">[</span> WA_SCOPEBOT <span style="color: #000000;">]</span><span style="color: #000000;">[</span>y<span style="color: #000000;">]</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span> > <span style="color: #000000;">0</span><br /> cScopeEXp := ADOPSEUDOSEEK<span style="color: #000000;">(</span>aWAData<span style="color: #000000;">[</span> WA_SCOPETOP <span style="color: #000000;">]</span><span style="color: #000000;">[</span>y<span style="color: #000000;">]</span>,aWAData,,.T.,aWAData<span style="color: #000000;">[</span> WA_SCOPEBOT <span style="color: #000000;">]</span><span style="color: #000000;">[</span>y<span style="color: #000000;">]</span><span style="color: #000000;">)</span><span style="color: #000000;">[</span><span style="color: #000000;">2</span><span style="color: #000000;">]</span><br /> <span style="color: #00C800;">ELSE</span><br /> cScopeExp :=<span style="color: #ff0000;">""</span><br /> <span style="color: #00C800;">ENDIF</span> <br /> <br /> cSql := IndexBuildExp<span style="color: #000000;">(</span>aWAData<span style="color: #000000;">[</span> WA_INDEXACTIVE <span style="color: #000000;">]</span>,aWAData,,cScopeExp<span style="color: #000000;">)</span><br /> oRecordSet:<span style="color: #000000;">Close</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> oRecordSet:<span style="color: #000000;">open</span><span style="color: #000000;">(</span>cSql,aWAData<span style="color: #000000;">[</span> WA_CONNECTION <span style="color: #000000;">]</span><span style="color: #000000;">)</span><br /> <br /> <span style="color: #00C800;">ENDIF</span><br /> <br /> <span style="color: #00C800;">RETURN</span> HB_SUCCESS<br /> </div>[/code:2s0ra0sw]
|
ADO RDD xHarbour
|
New adordd with scopes and Harbour syntax <!-- m --><a class="postlink" href="https://github.com/AHFERREIRA/adordd.git">https://github.com/AHFERREIRA/adordd.git</a><!-- m -->
|
ADO RDD xHarbour
|
Antonio,
Excellent! Great work <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
Now we need feedback from users. How is your app behaving with it ?
|
ADO RDD xHarbour
|
Antonio, Mr Rao,
The incremental search in xbrowse doesnt emulate propably the lSoftseek and since it works with filter can take an eternity.
Im trying this alternative and I would like to have your opinions:
oRecordSet.MoveLast
oRecordSet:Find( "NAME = 'whatever' ", , adSearchBackward)
oRecordSet:Move(1) == lSoftSeek
The remaining problem is when the cKey in dbseek corresponds to multiple fields but we dont have this case in our app <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D -->
|
ADO RDD xHarbour
|
Antonio,
Thanks
Our trials are running quite good although its still to soon to say how it will work and with what degree of compatibility with existing code.
I hope I can solve all upcoming problems that Im sure will be many.
Im going into reations do you have any news about my previous questions on this matter?
|
ADO RDD xHarbour
|
Antonio,
Very good to know that it is working fine on your tests, excellent <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
I don't have any specific idea regarding relationships. I would say that they could be simulated but I don't have the expertise to talk about it.
We need Rao advice <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
|
ADO RDD xHarbour
|
Hello,
First of all, to compile adordd.prg with Harbour, you need to add before ANNOUNCE ADORDD:
[code=fw:27e04uer]<div class="fw" id="{CB}" style="font-family: monospace;"><br />#ifndef __XHARBOUR__<br /><br /> <span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"fivewin.ch"</span> <span style="color: #B900B9;">// as Harbour does not have TRY / CATCH</span><br /> <span style="color: #00D7D7;">#define</span> UR_FI_FLAGS <span style="color: #000000;">6</span><br /> <span style="color: #00D7D7;">#define</span> UR_FI_STEP <span style="color: #000000;">7</span><br /> <span style="color: #00D7D7;">#define</span> UR_FI_SIZE <span style="color: #000000;">7</span> <span style="color: #B900B9;">//eram 5 ahf</span><br /><br />#endif<br /><br /> </div>[/code:27e04uer]
Next, I have to adapt ADO_OPEN to allow Access files, as you are using DBFS with ADS:
[code=fw:27e04uer]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><br /><span style="color: #00C800;">STATIC</span> <span style="color: #00C800;">FUNCTION</span> ADO_OPEN<span style="color: #000000;">(</span> nWA, aOpenInfo <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">LOCAL</span> aWAData := USRRDD_AREADATA<span style="color: #000000;">(</span> nWA <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">LOCAL</span> cName, aField, oError, nResult<br /> <span style="color: #00C800;">LOCAL</span> oRecordSet, nTotalFields, n<br /> <span style="color: #00C800;">LOCAL</span> nCountIndexes <span style="color: #B900B9;">// see below</span><br /><br /> <span style="color: #B900B9;">/* When there is no ALIAS we will create new one using file name */</span><br /> <span style="color: #00C800;">IF</span> Empty<span style="color: #000000;">(</span> aOpenInfo<span style="color: #000000;">[</span> UR_OI_ALIAS <span style="color: #000000;">]</span> <span style="color: #000000;">)</span><br /> hb_FNameSplit<span style="color: #000000;">(</span> aOpenInfo<span style="color: #000000;">[</span> UR_OI_NAME <span style="color: #000000;">]</span>,, @cName <span style="color: #000000;">)</span><br /> aOpenInfo<span style="color: #000000;">[</span> UR_OI_ALIAS <span style="color: #000000;">]</span> := cName<br /> <span style="color: #00C800;">ENDIF</span><br /><br /><br /><br /><span style="color: #B900B9;">/*<br /> //aOpenInfo[ UR_OI_NAME ] += ".dbf"<br /><br /> hb_adoSetTable( aOpenInfo[ UR_OI_NAME ] )<br /> hb_adoSetEngine( "")<br /> hb_adoSetServer( "")<br /> hb_adoSetQuery( )<br /> hb_adoSetUser( "")<br /> hb_adoSetPassword( "" )<br />*/</span><br /><br /><br /> <span style="color: #00C800;">IF</span> Empty<span style="color: #000000;">(</span> aOpenInfo<span style="color: #000000;">[</span> UR_OI_CONNECT <span style="color: #000000;">]</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">IF</span> EMPTY<span style="color: #000000;">(</span>oConnection<span style="color: #000000;">)</span><br /> aWAData<span style="color: #000000;">[</span> WA_CONNECTION <span style="color: #000000;">]</span> := TOleAuto<span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"ADODB.Connection"</span> <span style="color: #000000;">)</span><br /> oConnection := aWAData<span style="color: #000000;">[</span> WA_CONNECTION <span style="color: #000000;">]</span><br /> aWAData<span style="color: #000000;">[</span> WA_TABLENAME <span style="color: #000000;">]</span> := t_cTableName<br /> aWAData<span style="color: #000000;">[</span> WA_QUERY <span style="color: #000000;">]</span> := t_cQuery<br /> aWAData<span style="color: #000000;">[</span> WA_USERNAME <span style="color: #000000;">]</span> := t_cUserName<br /> aWAData<span style="color: #000000;">[</span> WA_PASSWORD <span style="color: #000000;">]</span> := t_cPassword<br /> aWAData<span style="color: #000000;">[</span> WA_SERVER <span style="color: #000000;">]</span> := t_cServer<br /> aWAData<span style="color: #000000;">[</span> WA_ENGINE <span style="color: #000000;">]</span> := t_cEngine<br /> aWAData<span style="color: #000000;">[</span> WA_CONNOPEN <span style="color: #000000;">]</span> := .T.<br /> aWAData<span style="color: #000000;">[</span> WA_OPENSHARED <span style="color: #000000;">]</span> := aOpenInfo<span style="color: #000000;">[</span> UR_OI_SHARED <span style="color: #000000;">]</span><br /><br /><br /><br /> <span style="color: #00C800;">DO</span> <span style="color: #00C800;">CASE</span><br /> <span style="color: #00C800;">CASE</span> Lower<span style="color: #000000;">(</span> <span style="color: #0000ff;">Right</span><span style="color: #000000;">(</span> aOpenInfo<span style="color: #000000;">[</span> UR_OI_NAME <span style="color: #000000;">]</span>, <span style="color: #000000;">4</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span> == <span style="color: #ff0000;">".mdb"</span><br /> <span style="color: #00C800;">IF</span> Empty<span style="color: #000000;">(</span> aWAData<span style="color: #000000;">[</span> WA_PASSWORD <span style="color: #000000;">]</span> <span style="color: #000000;">)</span><br /> aWAData<span style="color: #000000;">[</span> WA_CONNECTION <span style="color: #000000;">]</span>:<span style="color: #000000;">Open</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"Provider=Microsoft.Jet.OLEDB.4.0;Data Source="</span> + aOpenInfo<span style="color: #000000;">[</span> UR_OI_NAME <span style="color: #000000;">]</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">ELSE</span><br /> aWAData<span style="color: #000000;">[</span> WA_CONNECTION <span style="color: #000000;">]</span>:<span style="color: #000000;">Open</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"Provider=Microsoft.Jet.OLEDB.4.0;Data Source="</span> + aOpenInfo<span style="color: #000000;">[</span> UR_OI_NAME <span style="color: #000000;">]</span> + <span style="color: #ff0000;">";Jet OLEDB:Database Password="</span> + AllTrim<span style="color: #000000;">(</span> aWAData<span style="color: #000000;">[</span> WA_PASSWORD <span style="color: #000000;">]</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">ENDIF</span><br /> <span style="color: #00C800;">CASE</span> Lower<span style="color: #000000;">(</span> <span style="color: #0000ff;">Right</span><span style="color: #000000;">(</span> aOpenInfo<span style="color: #000000;">[</span> UR_OI_NAME <span style="color: #000000;">]</span>, <span style="color: #000000;">4</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span> == <span style="color: #ff0000;">".xls"</span><br /> aWAData<span style="color: #000000;">[</span> WA_CONNECTION <span style="color: #000000;">]</span>:<span style="color: #000000;">Open</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"Provider=Microsoft.Jet.OLEDB.4.0;Data Source="</span> + aOpenInfo<span style="color: #000000;">[</span> UR_OI_NAME <span style="color: #000000;">]</span> + <span style="color: #ff0000;">";Extended Properties='Excel 8.0;HDR=YES';Persist Security Info=False"</span> <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">CASE</span> Lower<span style="color: #000000;">(</span> <span style="color: #0000ff;">Right</span><span style="color: #000000;">(</span> aOpenInfo<span style="color: #000000;">[</span> UR_OI_NAME <span style="color: #000000;">]</span>, <span style="color: #000000;">4</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span> == <span style="color: #ff0000;">".dbf"</span><br /> cStr := CFILEPATH<span style="color: #000000;">(</span>aOpenInfo<span style="color: #000000;">[</span> UR_OI_NAME <span style="color: #000000;">]</span><span style="color: #000000;">)</span><br /> cStr := <span style="color: #0000ff;">SUBSTR</span><span style="color: #000000;">(</span>cStr,<span style="color: #000000;">1</span>,LEN<span style="color: #000000;">(</span>Cstr<span style="color: #000000;">)</span><span style="color: #000000;">-1</span><span style="color: #000000;">)</span><br /> cStr := <span style="color: #ff0000;">"d:<span style="color: #000000;">\f</span>ollowup-testes<span style="color: #000000;">\t</span>ESTES FOLLOWUP.add"</span><br /><span style="color: #B900B9;">//aWAData[ WA_CONNECTION ]:Open(adoconnect()) //trials</span><br /> aWAData<span style="color: #000000;">[</span> WA_CONNECTION <span style="color: #000000;">]</span>:<span style="color: #000000;">Open</span><span style="color: #000000;">(</span><span style="color: #ff0000;">"Provider=Advantage OLE DB Provider;User ID=adssys;Data Source="</span>+cStr+<span style="color: #ff0000;">";TableType=ADS_CDX;"</span>+;<br /> <span style="color: #ff0000;">"Advantage Server Type=ADS_LOCAL_SERVER;"</span><span style="color: #000000;">)</span><br /><br /><span style="color: #B900B9;">//OTHE PROVIDERS FOR DBF FOR TRIALS</span><br /><span style="color: #B900B9;">// aWAData[ WA_CONNECTION ]:Open("Provider=vfpoledb.1;Data Source="+cStr+";Collating Sequence=machine;")</span><br /><span style="color: #B900B9;">// aWAData[ WA_CONNECTION ]:Open( "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + cstr + ";Extended Properties=dBASE IV;User ID=Admin;Password=;" )</span><br /><br /> <span style="color: #00C800;">CASE</span> Lower<span style="color: #000000;">(</span> <span style="color: #0000ff;">Right</span><span style="color: #000000;">(</span> aOpenInfo<span style="color: #000000;">[</span> UR_OI_NAME <span style="color: #000000;">]</span>, <span style="color: #000000;">3</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span> == <span style="color: #ff0000;">".db"</span><br /> aWAData<span style="color: #000000;">[</span> WA_CONNECTION <span style="color: #000000;">]</span>:<span style="color: #000000;">Open</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"Provider=Microsoft.Jet.OLEDB.4.0;Data Source="</span> + aOpenInfo<span style="color: #000000;">[</span> UR_OI_NAME <span style="color: #000000;">]</span> + <span style="color: #ff0000;">";Extended Properties='Paradox 3.x';"</span> <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">CASE</span> aWAData<span style="color: #000000;">[</span> WA_ENGINE <span style="color: #000000;">]</span> == <span style="color: #ff0000;">"MYSQL"</span><br /> aWAData<span style="color: #000000;">[</span> WA_CONNECTION <span style="color: #000000;">]</span>:<span style="color: #000000;">Open</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"DRIVER={MySQL ODBC 3.51 Driver};"</span> + ;<br /> <span style="color: #ff0000;">"server="</span> + aWAData<span style="color: #000000;">[</span> WA_SERVER <span style="color: #000000;">]</span> + ;<br /> <span style="color: #ff0000;">";database="</span> + aOpenInfo<span style="color: #000000;">[</span> UR_OI_NAME <span style="color: #000000;">]</span> + ;<br /> <span style="color: #ff0000;">";uid="</span> + aWAData<span style="color: #000000;">[</span> WA_USERNAME <span style="color: #000000;">]</span> + ;<br /> <span style="color: #ff0000;">";pwd="</span> + aWAData<span style="color: #000000;">[</span> WA_PASSWORD <span style="color: #000000;">]</span> <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">CASE</span> aWAData<span style="color: #000000;">[</span> WA_ENGINE <span style="color: #000000;">]</span> == <span style="color: #ff0000;">"SQL"</span><br /> aWAData<span style="color: #000000;">[</span> WA_CONNECTION <span style="color: #000000;">]</span>:<span style="color: #000000;">Open</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"Provider=SQLOLEDB;"</span> + ;<br /> <span style="color: #ff0000;">"server="</span> + aWAData<span style="color: #000000;">[</span> WA_SERVER <span style="color: #000000;">]</span> + ;<br /> <span style="color: #ff0000;">";database="</span> + aOpenInfo<span style="color: #000000;">[</span> UR_OI_NAME <span style="color: #000000;">]</span> + ;<br /> <span style="color: #ff0000;">";uid="</span> + aWAData<span style="color: #000000;">[</span> WA_USERNAME <span style="color: #000000;">]</span> + ;<br /> <span style="color: #ff0000;">";pwd="</span> + aWAData<span style="color: #000000;">[</span> WA_PASSWORD <span style="color: #000000;">]</span> <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">CASE</span> aWAData<span style="color: #000000;">[</span> WA_ENGINE <span style="color: #000000;">]</span> == <span style="color: #ff0000;">"ORACLE"</span><br /> aWAData<span style="color: #000000;">[</span> WA_CONNECTION <span style="color: #000000;">]</span>:<span style="color: #000000;">Open</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"Provider=MSDAORA.1;"</span> + ;<br /> <span style="color: #ff0000;">"Persist Security Info=False"</span> + ;<br /> iif<span style="color: #000000;">(</span> Empty<span style="color: #000000;">(</span> aWAData<span style="color: #000000;">[</span> WA_SERVER <span style="color: #000000;">]</span> <span style="color: #000000;">)</span>, ;<br /> <span style="color: #ff0000;">""</span>, <span style="color: #ff0000;">";Data source="</span> + aWAData<span style="color: #000000;">[</span> WA_SERVER <span style="color: #000000;">]</span> <span style="color: #000000;">)</span> + ;<br /> <span style="color: #ff0000;">";User ID="</span> + aWAData<span style="color: #000000;">[</span> WA_USERNAME <span style="color: #000000;">]</span> + ;<br /> <span style="color: #ff0000;">";Password="</span> + aWAData<span style="color: #000000;">[</span> WA_PASSWORD <span style="color: #000000;">]</span> <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">CASE</span> aWAData<span style="color: #000000;">[</span> WA_ENGINE <span style="color: #000000;">]</span> == <span style="color: #ff0000;">"FIREBIRD"</span><br /> aWAData<span style="color: #000000;">[</span> WA_CONNECTION <span style="color: #000000;">]</span>:<span style="color: #000000;">Open</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"Driver=Firebird/InterBase(r) driver;"</span> + ;<br /> <span style="color: #ff0000;">"Persist Security Info=False"</span> + ;<br /> <span style="color: #ff0000;">";Uid="</span> + aWAData<span style="color: #000000;">[</span> WA_USERNAME <span style="color: #000000;">]</span> + ;<br /> <span style="color: #ff0000;">";Pwd="</span> + aWAData<span style="color: #000000;">[</span> WA_PASSWORD <span style="color: #000000;">]</span> + ;<br /> <span style="color: #ff0000;">";DbName="</span> + aOpenInfo<span style="color: #000000;">[</span> UR_OI_NAME <span style="color: #000000;">]</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">ENDCASE</span><br /> <span style="color: #00C800;">ELSE</span><br /> <span style="color: #B900B9;">// ITS ALREDY OPE THE ADODB CONN USE THE SAME WE WANT TRANSACTIONS WITHIN THE CONNECTION</span><br /> aWAData<span style="color: #000000;">[</span> WA_CONNECTION <span style="color: #000000;">]</span> := oConnection<br /> aWAData<span style="color: #000000;">[</span> WA_TABLENAME <span style="color: #000000;">]</span> := t_cTableName<br /> aWAData<span style="color: #000000;">[</span> WA_QUERY <span style="color: #000000;">]</span> := t_cQuery<br /> aWAData<span style="color: #000000;">[</span> WA_USERNAME <span style="color: #000000;">]</span> := t_cUserName<br /> aWAData<span style="color: #000000;">[</span> WA_PASSWORD <span style="color: #000000;">]</span> := t_cPassword<br /> aWAData<span style="color: #000000;">[</span> WA_SERVER <span style="color: #000000;">]</span> := t_cServer<br /> aWAData<span style="color: #000000;">[</span> WA_ENGINE <span style="color: #000000;">]</span> := t_cEngine<br /> aWAData<span style="color: #000000;">[</span> WA_CONNOPEN <span style="color: #000000;">]</span> := .T.<br /> aWAData<span style="color: #000000;">[</span> WA_OPENSHARED <span style="color: #000000;">]</span> := aOpenInfo<span style="color: #000000;">[</span> UR_OI_SHARED <span style="color: #000000;">]</span><br /> <span style="color: #00C800;">ENDIF</span><br /> <span style="color: #00C800;">ELSE</span><br /> <span style="color: #B900B9;">// here we dont save oconnection for the next one because</span><br /> <span style="color: #B900B9;">// we assume that is not application defult conn but a temporary conn</span><br /> <span style="color: #B900B9;">//to other db system.</span><br /> aWAData<span style="color: #000000;">[</span> WA_CONNECTION <span style="color: #000000;">]</span> := TOleAuto<span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">(</span><span style="color: #ff0000;">"ADODB.Connection"</span><span style="color: #000000;">)</span><br /> aWAData<span style="color: #000000;">[</span> WA_CONNECTION <span style="color: #000000;">]</span>:<span style="color: #000000;">Open</span><span style="color: #000000;">(</span> aOpenInfo<span style="color: #000000;">[</span> UR_OI_CONNECT <span style="color: #000000;">]</span> <span style="color: #000000;">)</span><br /> aWAData<span style="color: #000000;">[</span> WA_TABLENAME <span style="color: #000000;">]</span> := t_cTableName<br /> aWAData<span style="color: #000000;">[</span> WA_QUERY <span style="color: #000000;">]</span> := t_cQuery<br /> aWAData<span style="color: #000000;">[</span> WA_USERNAME <span style="color: #000000;">]</span> := t_cUserName<br /> aWAData<span style="color: #000000;">[</span> WA_PASSWORD <span style="color: #000000;">]</span> := t_cPassword<br /> aWAData<span style="color: #000000;">[</span> WA_SERVER <span style="color: #000000;">]</span> := t_cServer<br /> aWAData<span style="color: #000000;">[</span> WA_ENGINE <span style="color: #000000;">]</span> := t_cEngine<br /> aWAData<span style="color: #000000;">[</span> WA_CONNOPEN <span style="color: #000000;">]</span> := .F.<br /> <span style="color: #00C800;">ENDIF</span><br /> <span style="color: #B900B9;">/* will be initilized */</span><br /> t_cQuery := <span style="color: #ff0000;">""</span><br /><br /> <span style="color: #00C800;">IF</span> Empty<span style="color: #000000;">(</span> aWAData<span style="color: #000000;">[</span> WA_QUERY <span style="color: #000000;">]</span> <span style="color: #000000;">)</span><br /> aWAData<span style="color: #000000;">[</span> WA_QUERY <span style="color: #000000;">]</span> := <span style="color: #ff0000;">"SELECT * FROM "</span><br /> <span style="color: #00C800;">ENDIF</span><br /><br /> oRecordSet := TOleAuto<span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"ADODB.Recordset"</span> <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">IF</span> oRecordSet == <span style="color: #00C800;">NIL</span><br /> oError := ErrorNew<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> oError:<span style="color: #000000;">GenCode</span> := EG_OPEN<br /> oError:<span style="color: #000000;">SubCode</span> := <span style="color: #000000;">1001</span><br /> oError:<span style="color: #000000;">Description</span> := hb_langErrMsg<span style="color: #000000;">(</span> EG_OPEN <span style="color: #000000;">)</span><br /> oError:<span style="color: #000000;">FileName</span> := aOpenInfo<span style="color: #000000;">[</span> UR_OI_NAME <span style="color: #000000;">]</span><br /> oError:<span style="color: #000000;">OsCode</span> := <span style="color: #000000;">0</span> <span style="color: #B900B9;">/* TODO */</span><br /> oError:<span style="color: #000000;">CanDefault</span> := .T.<br /><br /> UR_SUPER_ERROR<span style="color: #000000;">(</span> nWA, oError <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">RETURN</span> HB_FAILURE<br /> <span style="color: #00C800;">ENDIF</span><br /><br /> oRecordSet:<span style="color: #000000;">CursorType</span> := adOpenDynamic<br /> oRecordSet:<span style="color: #000000;">CursorLocation</span> := adUseServer <span style="color: #B900B9;">// adUseClient its slower but has avntages such always bookmaks</span><br /> oRecordSet:<span style="color: #000000;">LockType</span> := adLockPessimistic<br /><br /><br /> <span style="color: #B900B9;">// LUCAS</span><br /> <span style="color: #B900B9;">//aWAData[ WA_TABLENAME ] := SUBSTR(CFILENOPATH(aWAData[ WA_TABLENAME ] ),1,LEN(CFILENOPATH(aWAData[ WA_TABLENAME ] ))-4)</span><br /><br /> <span style="color: #00C800;">IF</span> aWAData<span style="color: #000000;">[</span> WA_QUERY <span style="color: #000000;">]</span> == <span style="color: #ff0000;">"SELECT * FROM "</span><br /><br /> ALERT<span style="color: #000000;">(</span>aWAData<span style="color: #000000;">[</span> WA_TABLENAME <span style="color: #000000;">]</span><span style="color: #000000;">)</span><br /> oRecordSet:<span style="color: #000000;">Open</span><span style="color: #000000;">(</span> aWAData<span style="color: #000000;">[</span> WA_QUERY <span style="color: #000000;">]</span> + aWAData<span style="color: #000000;">[</span> WA_TABLENAME <span style="color: #000000;">]</span>, aWAData<span style="color: #000000;">[</span> WA_CONNECTION <span style="color: #000000;">]</span><span style="color: #000000;">)</span><br /> <span style="color: #B900B9;">//this should allow prop index and seek adCmdTableDirect</span><br /> <span style="color: #00C800;">ELSE</span><br /> oRecordSet:<span style="color: #000000;">Open</span><span style="color: #000000;">(</span> aWAData<span style="color: #000000;">[</span> WA_QUERY <span style="color: #000000;">]</span>, aWAData<span style="color: #000000;">[</span> WA_CONNECTION <span style="color: #000000;">]</span>,,,adCmdTableDirect <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">ENDIF</span><br /><br /> aWAData<span style="color: #000000;">[</span> WA_RECORDSET <span style="color: #000000;">]</span> := oRecordSet<br /> aWAData<span style="color: #000000;">[</span> WA_BOF <span style="color: #000000;">]</span> := aWAData<span style="color: #000000;">[</span> WA_EOF <span style="color: #000000;">]</span> := .F.<br /><br /> UR_SUPER_SETFIELDEXTENT<span style="color: #000000;">(</span> nWA, nTotalFields := oRecordSet:<span style="color: #000000;">Fields</span>:<span style="color: #0000ff;">Count</span> <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">FOR</span> n := <span style="color: #000000;">1</span> <span style="color: #0000ff;">TO</span> nTotalFields<br /><br /> aField := Array<span style="color: #000000;">(</span> UR_FI_SIZE <span style="color: #000000;">)</span><br /> aField<span style="color: #000000;">[</span> UR_FI_NAME <span style="color: #000000;">]</span> := oRecordSet:<span style="color: #000000;">Fields</span><span style="color: #000000;">(</span> n - <span style="color: #000000;">1</span> <span style="color: #000000;">)</span>:<span style="color: #0000ff;">Name</span><br /> aField<span style="color: #000000;">[</span> UR_FI_TYPE <span style="color: #000000;">]</span> := ADO_FIELDSTRUCT<span style="color: #000000;">(</span> oRecordSet, n<span style="color: #000000;">-1</span> <span style="color: #000000;">)</span><span style="color: #000000;">[</span><span style="color: #000000;">7</span><span style="color: #000000;">]</span><br /> aField<span style="color: #000000;">[</span> UR_FI_TYPEEXT <span style="color: #000000;">]</span> := <span style="color: #000000;">0</span><br /> aField<span style="color: #000000;">[</span> UR_FI_LEN <span style="color: #000000;">]</span> := ADO_FIELDSTRUCT<span style="color: #000000;">(</span> oRecordSet, n<span style="color: #000000;">-1</span> <span style="color: #000000;">)</span><span style="color: #000000;">[</span><span style="color: #000000;">3</span><span style="color: #000000;">]</span><br /> aField<span style="color: #000000;">[</span> UR_FI_DEC <span style="color: #000000;">]</span> := ADO_FIELDSTRUCT<span style="color: #000000;">(</span> oRecordSet, n<span style="color: #000000;">-1</span> <span style="color: #000000;">)</span><span style="color: #000000;">[</span><span style="color: #000000;">4</span><span style="color: #000000;">]</span><br /> aField<span style="color: #000000;">[</span> UR_FI_FLAGS <span style="color: #000000;">]</span> := <span style="color: #000000;">0</span> <span style="color: #B900B9;">// xHarbour expecs this field</span><br /> aField<span style="color: #000000;">[</span> UR_FI_STEP <span style="color: #000000;">]</span> := <span style="color: #000000;">0</span> <span style="color: #B900B9;">// xHarbour expecs this field</span><br /><br /><br /> alert<span style="color: #000000;">(</span>nwa<span style="color: #000000;">)</span><br /> xbrowser @afield FASTEDIT<br /> <br /><span style="color: #B900B9;">// here error happens:</span><br />UR_SUPER_ADDFIELD<span style="color: #000000;">(</span> nWA, aField <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">NEXT</span><br /><br /> nResult := UR_SUPER_OPEN<span style="color: #000000;">(</span> nWA, aOpenInfo <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">IF</span> nResult == HB_SUCCESS<br /> ADO_GOTOP<span style="color: #000000;">(</span> nWA <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">ENDIF</span><br /><br /> <span style="color: #00C800;">RETURN</span> nResult<br /><br /><br /> </div>[/code:27e04uer]
But, in UR_SUPER_ADDFIELD( nWA, aField ) i get:
[quote:27e04uer]Error description: Error ADORDD/1003 Argument error
Stack Calls
===========
Called from: => UR_SUPER_ADDFIELD(0)[/quote:27e04uer]
But xbrowse shows values, so the Access database is opened.
Something wrong with aField structure?.
Thank you.
|
ADO RDD xHarbour
|
Antonio,
I can discover only 2 possible ways:
a) 2 recordsets the parent look with find in the child. With server cursor should be very fast.
b) 1 recordset parent and multiple recordsets as child when parent looks by corresponding match.
I remember a read somewere that there was subrecordset but I dont remember if it was with ado.net
Meantime I post most recent version adordd.prg adordd.ch with seeks working like in dbfs <!-- m --><a class="postlink" href="https://github.com/AHFERREIRA/adordd.git">https://github.com/AHFERREIRA/adordd.git</a><!-- m -->
|
ADO RDD xHarbour
|
Antonio,
[quote:2l43sf63]b) 1 recordset parent and multiple recordsets as child when parent looks by corresponding match.[/quote:2l43sf63]
Yes, thats my idea unless there is a better way to do it using ADO features.
We need Rao advice, or other ADO advanced users advice
|
ADO RDD xHarbour
|
Lucas,
You re right Ill apply your changes.
Comment these and check what is the UR_FI_SIZE in hbusrdd.ch
aField[ UR_FI_FLAGS ] := 0 // xHarbour expecs this field
aField[ UR_FI_STEP ] := 0 // xHarbour expecs this field
I think Harbour ony accepts 5 ele.
|
ADO RDD xHarbour
|
Hello,
In hbusrrdd.ch, there is:
#define UR_FI_SIZE 5
Yes, before posting I comment out with no luck:
// aField[ UR_FI_FLAGS ] := 0 // xHarbour expecs this field
// aField[ UR_FI_STEP ] := 0 // xHarbour expecs this field
Antonio, maybe as Antonio´s developing a great efford he could enjoy latest FWH?.
Having ADORDD for the community will be a goal.
Thank you.
|
ADO RDD xHarbour
|
Lucas,
I appreciate your proposal but I have no time now to install new versions of FWH or Harbour or xHarbour.
The alternatives in hbusrdd.ch are (one of wich shoul work) :
a) #define UR_FI_SIZE 5
comment in ado_open
// aField[ UR_FI_FLAGS ] := 0 // xHarbour expecs this field
// aField[ UR_FI_STEP ] := 0 // xHarbour expecs this field
b) #define UR_FI_SIZE 7
add in hbusrrd.ch
#define UR_FI_FLAGS 6
# define UR_FI_STEP 7
uncomment comment in ado_open
aField[ UR_FI_FLAGS ] := 0 // xHarbour expecs this field
aField[ UR_FI_STEP ] := 0 // xHarbour expecs this field
|
ADO RDD xHarbour
|
Antonio, Enrico, Mr Rao,
It seems that in ADO datarelations are not available like in ADO.NET so we have to do everything ourselves from scratch.
Ive found this article:
[quote:2ga6vuxn]One of the biggest differences between traditional ADO and ADO.NET is that the rowsets stored within ADO.NET can be truly relational. For example, a DataSet can store one DataTable containing customers and another DataTable containing the customers' orders. These DataTable objects can then be related to one another within ADO.NET, thus recreating the relationship that exists within the relational database. In ADO.NET once you retrieve two rowsets of data (in other words, parents and children) and relate them to each other, you can then retrieve all children rows for a given parent, display any one DataTable in a grid at a time, or modify several tiers of DataTable objects, and send the changes to the database all in one batch update. DataRelation objects, which are integral to ADO.NET applications, enable these features to function.[/quote:2ga6vuxn]
Do you have any ideas on the approach?
|
ADO RDD xHarbour
|
Antonio,
What Rdd function DbCommit() and DbCommitAll() are calling ?
I need it to design the transactions.
|
ADO RDD xHarbour
|
Antonio,
From Harbour/src/rdd/dbcmd.c
[code=fw:2650cd76]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">(</span> DBCOMMIT <span style="color: #000000;">)</span><br /><span style="color: #000000;">{</span><br /> AREAP pArea = <span style="color: #000000;">(</span> AREAP <span style="color: #000000;">)</span> hb_rddGetCurrentWorkAreaPointer<span style="color: #000000;">(</span><span style="color: #000000;">)</span>;<br /><br /> <span style="color: #00C800;">if</span><span style="color: #000000;">(</span> pArea <span style="color: #000000;">)</span><br /> SELF_FLUSH<span style="color: #000000;">(</span> pArea <span style="color: #000000;">)</span>;<br /> <span style="color: #00C800;">else</span><br /> hb_errRT_DBCMD<span style="color: #000000;">(</span> EG_NOTABLE, EDBCMD_NOTABLE, <span style="color: #00C800;">NULL</span>, HB_ERR_FUNCNAME <span style="color: #000000;">)</span>;<br /><span style="color: #000000;">}</span><br /><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">(</span> DBCOMMITALL <span style="color: #000000;">)</span><br /><span style="color: #000000;">{</span><br /> hb_rddFlushAll<span style="color: #000000;">(</span><span style="color: #000000;">)</span>;<br /><span style="color: #000000;">}</span></div>[/code:2650cd76]
|
ADO RDD xHarbour
|
Antonio,
Im trying this code to control if a table can be opened exclusive.
The probem is I dont know what to return to the open to be failled.
[code=fw:1hlvs8x3]<div class="fw" id="{CB}" style="font-family: monospace;"> <span style="color: #B900B9;">//OPEN EXCLUSIVE MUST BE WITHIN A TRANSACTION!</span><br /> <span style="color: #00C800;">IF</span> !aWAData<span style="color: #000000;">[</span> WA_OPENSHARED <span style="color: #000000;">]</span> <br /> <span style="color: #B900B9;">//THERE IS ANOTHER TOP LEVEL TRANSACTION OPEN EXCLUSIVE</span><br /> <span style="color: #00C800;">IF</span> aWAData<span style="color: #000000;">[</span> WA_CONNECTION <span style="color: #000000;">]</span>:<span style="color: #000000;">BeginTrans</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> > <span style="color: #000000;">1</span> <br /> aWAData<span style="color: #000000;">[</span> WA_CONNECTION <span style="color: #000000;">]</span>:<span style="color: #000000;">CommitTrans</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #B900B9;">// CLOSE TRANSACT THERE IS NOTHING TO COMMITT</span><br /> nResult := HB_SUCCESS <br /> <span style="color: #00C800;">ELSE</span> <span style="color: #B900B9;">//TABLE EXCLUSIVE NOT WITHIN TRANSACTION FAIL TO OPEN</span><br /> NETERR<span style="color: #000000;">(</span>.F.<span style="color: #000000;">)</span><br /> nResult := HB_FAILURE<br /> <span style="color: #00C800;">ENDIF</span><br /> <span style="color: #00C800;">ENDIF</span> </div>[/code:1hlvs8x3]
Dbcommit it go always to UR_FLUSH that goes to ADO_FLUSH right?
But how can I trap hb_rddFlushAll()? This one isnt going to the rdd.
|
ADO RDD xHarbour
|
Antonio,
The same but for each workarea:
[code=fw:3nnym9zx]<div class="fw" id="{CB}" style="font-family: monospace;">void hb_rddFlushAll<span style="color: #000000;">(</span> void <span style="color: #000000;">)</span><br /><span style="color: #000000;">{</span><br /> PHB_STACKRDD pRddInfo = hb_stackRDD<span style="color: #000000;">(</span><span style="color: #000000;">)</span>;<br /> HB_USHORT uiArea = <span style="color: #000000;">(</span> HB_AREANO <span style="color: #000000;">)</span> hb_rddGetCurrentWorkAreaNumber<span style="color: #000000;">(</span><span style="color: #000000;">)</span>, uiIndex;<br /><br /> <span style="color: #00C800;">for</span><span style="color: #000000;">(</span> uiIndex = <span style="color: #000000;">1</span>; uiIndex < pRddInfo->uiWaMax; ++uiIndex <span style="color: #000000;">)</span><br /> <span style="color: #000000;">{</span><br /> hb_rddSelectWorkAreaNumber<span style="color: #000000;">(</span> <span style="color: #000000;">(</span> <span style="color: #000000;">(</span> AREAP <span style="color: #000000;">)</span> pRddInfo->waList<span style="color: #000000;">[</span> uiIndex <span style="color: #000000;">]</span> <span style="color: #000000;">)</span>->uiArea <span style="color: #000000;">)</span>;<br /> SELF_FLUSH<span style="color: #000000;">(</span> <span style="color: #000000;">(</span> AREAP <span style="color: #000000;">)</span> pRddInfo->pCurrArea <span style="color: #000000;">)</span>;<br /> <span style="color: #000000;">}</span><br /> hb_rddSelectWorkAreaNumber<span style="color: #000000;">(</span> uiArea <span style="color: #000000;">)</span>;<br /><span style="color: #000000;">}</span></div>[/code:3nnym9zx]
|
ADO RDD xHarbour
|
Antonio,
Regarding concurrent access I choose to initiate a transaction as soon as the first lock is called and end it as soon a dbcommit is called.
I assume that the code of apps its written in this mode, dbcommit its only called after all changes otherwise the result migh be unpredictable.
We could also do it with unlock. What is your opinion?
Do you think this code works?
[code=fw:320mmq45]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">STATIC</span> <span style="color: #00C800;">FUNCTION</span> ADO_LOCK<span style="color: #000000;">(</span> nWA, aLockInfo <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">LOCAL</span> aWdata := USRRDD_AREADATA<span style="color: #000000;">(</span> nWA <span style="color: #000000;">)</span>,B,AA:= <span style="color: #000000;">{</span><span style="color: #000000;">}</span><br /> <br /> HB_SYMBOL_UNUSED<span style="color: #000000;">(</span> nWA <span style="color: #000000;">)</span><br /> <br /> <span style="color: #00C800;">IF</span> EMPTY<span style="color: #000000;">(</span>aLockInfo<span style="color: #000000;">[</span> UR_LI_RECORD <span style="color: #000000;">]</span><span style="color: #000000;">)</span> .OR. aLockInfo<span style="color: #000000;">[</span> UR_LI_METHOD <span style="color: #000000;">]</span> = DBLM_EXCLUSIVE<br /> ADO_UNLOCK<span style="color: #000000;">(</span> nWA, aLockInfo<span style="color: #000000;">[</span> UR_LI_RECORD <span style="color: #000000;">]</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">ENDIF</span> <br /><br /> <span style="color: #B900B9;">/*<br /> UR_LI_METHOD VALUES CONSTANTS<br /> DBLM_EXCLUSIVE 1 RELEASE ALL AND LOCK CURRENT <br /> DBLM_MULTIPLE 2 LOCK CURRENT AND ADD TO LOCKLIST<br /> DBLM_FILE 3 RELEASE ALL LOCKS AND FILE LOCK <br /> */</span><br /> <br /> <span style="color: #00C800;">IF</span> aLockInfo<span style="color: #000000;">[</span>UR_LI_METHOD<span style="color: #000000;">]</span> = DBLM_FILE<br /> aLockInfo<span style="color: #000000;">[</span> UR_LI_RESULT <span style="color: #000000;">]</span> := .T.<br /> aWdata<span style="color: #000000;">[</span> WA_FILELOCK <span style="color: #000000;">]</span> := .T.<br /> <span style="color: #00C800;">ELSE</span><br /> aLockInfo<span style="color: #000000;">[</span> UR_LI_RECORD <span style="color: #000000;">]</span> := RecNo<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> aLockInfo<span style="color: #000000;">[</span> UR_LI_RESULT <span style="color: #000000;">]</span> := .T.<br /> AADD<span style="color: #000000;">(</span>aWdata<span style="color: #000000;">[</span> WA_LOCKLIST <span style="color: #000000;">]</span>,aLockInfo<span style="color: #000000;">[</span> UR_LI_RECORD <span style="color: #000000;">]</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">ENDIF</span> <br /> <br /> <span style="color: #B900B9;">/* TRANSACTION CONCURRENT ACCESS THIS COULD BE MADE BY A QUERY TO THE DB BUT DIFFERENT<br /> SYNTAXES ARE USED BETWEEN EACH DB*/</span><br /> <span style="color: #00C800;">IF</span> aWdata<span style="color: #000000;">[</span> WA_CONNECTION <span style="color: #000000;">]</span>:<span style="color: #000000;">BeginTrans</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> > <span style="color: #000000;">1</span> <span style="color: #B900B9;">//already protected by a existing transaction do nothing</span><br /> aWdata<span style="color: #000000;">[</span> WA_CONNECTION <span style="color: #000000;">]</span>:<span style="color: #000000;">RollbackTrans</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #B900B9;">//started above theres nothing to rollback only to cancel it</span><br /> <span style="color: #00C800;">ENDIF</span><br /> <br /> <span style="color: #00C800;">RETURN</span> HB_SUCCESS<br /><br /> <br /><span style="color: #00C800;">STATIC</span> <span style="color: #00C800;">FUNCTION</span> ADO_UNLOCK<span style="color: #000000;">(</span> nWA, xRecID <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">LOCAL</span> aWdata := USRRDD_AREADATA<span style="color: #000000;">(</span> nWA <span style="color: #000000;">)</span>,n<br /><br /> HB_SYMBOL_UNUSED<span style="color: #000000;">(</span> xRecId <span style="color: #000000;">)</span><br /> HB_SYMBOL_UNUSED<span style="color: #000000;">(</span> nWA <span style="color: #000000;">)</span><br /> <br /> <span style="color: #00C800;">IF</span> !EMPTY<span style="color: #000000;">(</span>xRecID<span style="color: #000000;">)</span><br /> n := ASCAN<span style="color: #000000;">(</span>aWdata<span style="color: #000000;">[</span> WA_LOCKLIST <span style="color: #000000;">]</span>,xRecID<span style="color: #000000;">)</span><br /> <span style="color: #00C800;">IF</span> n > <span style="color: #000000;">0</span><br /> ADEL<span style="color: #000000;">(</span>aWdata<span style="color: #000000;">[</span> WA_LOCKLIST <span style="color: #000000;">]</span>,n,.T.<span style="color: #000000;">)</span><br /> <span style="color: #00C800;">ENDIF</span><br /> <span style="color: #00C800;">ELSE</span><br /> aWdata<span style="color: #000000;">[</span> WA_LOCKLIST <span style="color: #000000;">]</span> := <span style="color: #000000;">{</span><span style="color: #000000;">}</span><br /> aWdata<span style="color: #000000;">[</span> WA_FILELOCK <span style="color: #000000;">]</span> := .F.<br /> <span style="color: #00C800;">ENDIF</span> <br /> <br /> <span style="color: #00C800;">RETURN</span> HB_SUCCESS<br /><br /> <span style="color: #00C800;">STATIC</span> <span style="color: #00C800;">FUNCTION</span> ADO_FLUSH<span style="color: #000000;">(</span> nWA <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">LOCAL</span> oRecordSet := USRRDD_AREADATA<span style="color: #000000;">(</span> nWA <span style="color: #000000;">)</span><span style="color: #000000;">[</span> WA_RECORDSET <span style="color: #000000;">]</span><br /><br /> <span style="color: #00C800;">TRY</span><br /> <br /> oRecordSet:<span style="color: #0000ff;">Update</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <br /> <span style="color: #B900B9;">/* TRANSACTION CONCURRENT ACCESS THIS COULD BE MADE BY A QUERY TO THE DB BUT DIFFERENT <br /> SYNTAXES ARE USED BETWEEN EACH DB*/</span><br /> <span style="color: #00C800;">IF</span> aWdata<span style="color: #000000;">[</span> WA_CONNECTION <span style="color: #000000;">]</span>:<span style="color: #000000;">BeginTrans</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> > <span style="color: #000000;">1</span> <span style="color: #B900B9;">//already protected by a existing transaction do othing</span><br /> aWdata<span style="color: #000000;">[</span> WA_CONNECTION <span style="color: #000000;">]</span>:<span style="color: #000000;">CommitTrans</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #B900B9;">//started above theres nothing to commit only to cancel it</span><br /> <span style="color: #00C800;">ENDIF</span><br /> <span style="color: #B900B9;">//now we commit current transaction</span><br /> aWdata<span style="color: #000000;">[</span> WA_CONNECTION <span style="color: #000000;">]</span>:<span style="color: #000000;">CommitTrans</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <br /> CATCH<br /> <br /> <span style="color: #00C800;">IF</span> aWdata<span style="color: #000000;">[</span> WA_CONNECTION <span style="color: #000000;">]</span>:<span style="color: #000000;">BeginTrans</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> > <span style="color: #000000;">1</span> <span style="color: #B900B9;">//already protected by a existing transaction do othing</span><br /> aWdata<span style="color: #000000;">[</span> WA_CONNECTION <span style="color: #000000;">]</span>:<span style="color: #000000;">CommitTrans</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #B900B9;">//started above theres nothing to commit only to cancel it</span><br /> <span style="color: #00C800;">ENDIF</span><br /> <span style="color: #B900B9;">//now we roll back current transaction</span><br /> aWdata<span style="color: #000000;">[</span> WA_CONNECTION <span style="color: #000000;">]</span>:<span style="color: #000000;">RollbackTrans</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <br /> END<br /><br /> <span style="color: #00C800;">RETURN</span> HB_SUCCESS<br /><br /> </div>[/code:320mmq45]
How can I do to return a failure use in ado_open()
|
ADO RDD xHarbour
|
Antonio,
My suggestion is to test it, as much as possible, by you and other users. Its the only way to know if it will work fine.
Regarding the failure, you should raise an error object. Please review arrayrdd.prg for an example
|
ADO RDD xHarbour
|
In case you may be interested
Two functions ADO to FWH
- Clear Table
- Mostras database tables (other than those included in FW AdoFuncs)
Por si puede interesar
Dos funciones ADO para FWH
- Borrar tabla
- Mostras tablas de base de datos ( distinta a la incluida en FW AdoFuncs )
<!-- l --><a class="postlink-local" href="http://forums.fivetechsupport.com/viewtopic.php?f=19&t=27296&p=164348&hilit=empezando+con+ado#p164348">viewtopic.php?f=19&t=27296&p=164348&hilit=empezando+con+ado#p164348</a><!-- l -->
|
ADO RDD xHarbour
|
Antonio,
When we use select() what function does it call in rdd?
Thanks Cristobal any help is most welcome
|
ADO RDD xHarbour
|
Antonio,
[code=fw:26gg3t6w]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #B900B9;">/*<br /> * Select a WorkArea by the number.<br /> */</span><br />HB_ERRCODE hb_rddSelectWorkAreaNumber<span style="color: #000000;">(</span> int iArea <span style="color: #000000;">)</span><br /><span style="color: #000000;">{</span><br /> PHB_STACKRDD pRddInfo;<br /><br /> HB_TRACE<span style="color: #000000;">(</span> HB_TR_DEBUG, <span style="color: #000000;">(</span> <span style="color: #ff0000;">"hb_rddSelectWorkAreaNumber(%d)"</span>, iArea <span style="color: #000000;">)</span> <span style="color: #000000;">)</span>;<br /><br /> pRddInfo = hb_stackRDD<span style="color: #000000;">(</span><span style="color: #000000;">)</span>;<br /> <span style="color: #00C800;">if</span><span style="color: #000000;">(</span> iArea < <span style="color: #000000;">1</span> || iArea > HB_RDD_MAX_AREA_NUM <span style="color: #000000;">)</span><br /> HB_SET_WA<span style="color: #000000;">(</span> <span style="color: #000000;">0</span> <span style="color: #000000;">)</span>;<br /> <span style="color: #00C800;">else</span><br /> HB_SET_WA<span style="color: #000000;">(</span> <span style="color: #000000;">(</span> HB_AREANO <span style="color: #000000;">)</span> iArea <span style="color: #000000;">)</span>;<br /><br /> <span style="color: #00C800;">return</span> <span style="color: #000000;">(</span> pRddInfo->pCurrArea == <span style="color: #00C800;">NULL</span> <span style="color: #000000;">)</span> ? HB_FAILURE : <span style="color: #000000;">HB_SUCCESS</span>;<br /><span style="color: #000000;">}</span></div>[/code:26gg3t6w]
[code=fw:26gg3t6w]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#define</span> HB_SET_WA<span style="color: #000000;">(</span> n <span style="color: #000000;">)</span> \<br /> <span style="color: #00C800;">do</span> \<br /> <span style="color: #000000;">{</span> \<br /> pRddInfo->uiCurrArea = n; \<br /> pRddInfo->pCurrArea = <span style="color: #000000;">(</span> <span style="color: #000000;">(</span> pRddInfo->uiCurrArea < pRddInfo->uiWaNumMax <span style="color: #000000;">)</span> ? \<br /> pRddInfo->waList<span style="color: #000000;">[</span> pRddInfo->waNums<span style="color: #000000;">[</span> pRddInfo->uiCurrArea <span style="color: #000000;">]</span> <span style="color: #000000;">]</span> : \<br /> <span style="color: #00C800;">NULL</span> <span style="color: #000000;">)</span>; \<br /> <span style="color: #000000;">}</span> <span style="color: #00C800;">while</span><span style="color: #000000;">(</span> <span style="color: #000000;">0</span> <span style="color: #000000;">)</span></div>[/code:26gg3t6w]
|
ADO RDD xHarbour
|
Antonio,
Option a) worked.
This is the code for Harbour:
[code=fw:1udug06m]<div class="fw" id="{CB}" style="font-family: monospace;"><br />#ifndef __XHARBOUR__<br /><br /> <span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"fivewin.ch"</span> <span style="color: #B900B9;">// as Harbour does not have TRY / CATCH</span><br /> <span style="color: #00D7D7;">#define</span> UR_FI_FLAGS <span style="color: #000000;">6</span><br /> <span style="color: #00D7D7;">#define</span> UR_FI_STEP <span style="color: #000000;">7</span><br /> <span style="color: #00D7D7;">#define</span> UR_FI_SIZE <span style="color: #000000;">5</span> <span style="color: #B900B9;">// by Lucas for Harbour</span><br /><br /><br />#endif<br /> </div>[/code:1udug06m]
Unfortunatelly, xBrowse() does not work.
It needs in ADO_INFO() to have DBI_FULLPATH.
I hacked like this with no luck:
[code=fw:1udug06m]<div class="fw" id="{CB}" style="font-family: monospace;"> <span style="color: #00C800;">CASE</span> uInfoType == DBI_FULLPATH <span style="color: #B900B9;">// 10 /* The Full path to the data file */</span><br /><br /> <span style="color: #0000ff;">MSGINFO</span><span style="color: #000000;">(</span><span style="color: #ff0000;">"IN SQL FULL PATH DOES NOT MATTER!"</span>, <span style="color: #ff0000;">"DBI_FULLPATH "</span><span style="color: #000000;">)</span><br /> uReturn := <span style="color: #ff0000;">""</span><br /> </div>[/code:1udug06m]
Now, I get:
Error description: (DOS Error -2147352567) WINOLE/1007 El recordset actual no admite marcadores. Puede deberse a una limitación del proveedor o del tipo de cursor seleccionado. (0x800A0CB3): ADODB.Recordset
Args:
[ 1] = N -1
[ 2] = N 0
Stack Calls
===========
Called from: => TOLEAUTO:MOVE( 0 )
Called from: lucas2.prg => ADO_GOTOID( 524 )
Called from: => DBGOTO( 0 )
Called from: .\source\classes\XBROWSE.PRG => (b)TXBROWSE_SETRDD( 4083 )
Called from: .\source\classes\XBROWSE.PRG => (b)TXBROWSE( 439 )
Called from: .\source\classes\XBROWSE.PRG => TXBROWSE:_BOOKMARK( 0 )
Called from: .\source\function\XBROWSER.PRG => FITSIZES( 283 )
Called from: .\source\function\XBROWSER.PRG => (b)XBROWSE( 220 )
Called from: .\source\classes\DIALOG.PRG => TDIALOG:INITIATE( 700 )
Called from: .\source\classes\DIALOG.PRG => TDIALOG:HANDLEEVENT( 890 )
Called from: => DIALOGBOXINDIRECT( 0 )
Called from: .\source\classes\DIALOG.PRG => TDIALOG:ACTIVATE( 286 )
Called from: .\source\function\XBROWSER.PRG => XBROWSE( 220 )
Called from: lucas2.prg => MAIN( 44 )
|
ADO RDD xHarbour
|
In English:
The current recordset does not support bookmarks . It may be due to a limitation of the provider or cursor type selected
|
ADO RDD xHarbour
|
Lucas,
[quote:1fgfkl72]#define UR_FI_SIZE 5 // by Lucas for Harbour[/quote:1fgfkl72]
xHarbour needs 7 as the len of the array.
You succed to return the fullpath ? Why xbrowse needs fullpath?
Checking if file exists isnt still ready for SQL.
Try use CursorLocation= adUseClient ADO assures bookmarks with this cursor.
I think in a multiuser envirements using absolutepositon does not assure that you will be able to get back to that position for ex a row its deleted the rows are renumbered.
I think we should had in ado_open
if orecordset:supports(adBookmarks)
use servercursor
else
use clientcursor
I will check that later.
What DB are you using?
|
ADO RDD xHarbour
|
Antonio,
1) In hbusrdd.ch DBRELINFO what is UR_RI_NEXT for ?
2) What shall we put in ADO_INFO :
DBI_FULLPATH
DBI_TABLEEXT
DBI_FILEHANDLE
|
ADO RDD xHarbour
|
Hello,
I am using Access for the tests.
We shall ask Mr. Nages about this xBrowse() issue.
Pure Browse() works, but scrolling does not work ok.
Append blank fails.
Thank you
|
ADO RDD xHarbour
|
Antonio,
[code=fw:28snbxc9]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">static</span> PHB_ITEM hb_usrRelInfoToItem<span style="color: #000000;">(</span> LPDBRELINFO pRelInfo <span style="color: #000000;">)</span><br /><span style="color: #000000;">{</span><br /> PHB_ITEM pItem;<br /><br /> pItem = hb_itemArrayNew<span style="color: #000000;">(</span> UR_RI_SIZE <span style="color: #000000;">)</span>;<br /> <span style="color: #00C800;">if</span><span style="color: #000000;">(</span> pRelInfo->itmCobExpr <span style="color: #000000;">)</span><br /> hb_itemCopy<span style="color: #000000;">(</span> hb_arrayGetItemPtr<span style="color: #000000;">(</span> pItem, UR_RI_BEXPR <span style="color: #000000;">)</span>, pRelInfo->itmCobExpr <span style="color: #000000;">)</span>;<br /> <span style="color: #00C800;">if</span><span style="color: #000000;">(</span> pRelInfo->abKey <span style="color: #000000;">)</span><br /> hb_itemCopy<span style="color: #000000;">(</span> hb_arrayGetItemPtr<span style="color: #000000;">(</span> pItem, UR_RI_CEXPR <span style="color: #000000;">)</span>, pRelInfo->abKey <span style="color: #000000;">)</span>;<br /> hb_itemPutL<span style="color: #000000;">(</span> hb_arrayGetItemPtr<span style="color: #000000;">(</span> pItem, UR_RI_SCOPED <span style="color: #000000;">)</span>, pRelInfo->isScoped <span style="color: #000000;">)</span>;<br /> hb_itemPutL<span style="color: #000000;">(</span> hb_arrayGetItemPtr<span style="color: #000000;">(</span> pItem, UR_RI_OPTIMIZED <span style="color: #000000;">)</span>, pRelInfo->isOptimized <span style="color: #000000;">)</span>;<br /> hb_itemPutNI<span style="color: #000000;">(</span> hb_arrayGetItemPtr<span style="color: #000000;">(</span> pItem, UR_RI_PARENT <span style="color: #000000;">)</span>, pRelInfo->lpaParent ? pRelInfo->lpaParent->uiArea : <span style="color: #000000;">0</span> <span style="color: #000000;">)</span>;<br /> hb_itemPutNI<span style="color: #000000;">(</span> hb_arrayGetItemPtr<span style="color: #000000;">(</span> pItem, UR_RI_CHILD <span style="color: #000000;">)</span>, pRelInfo->lpaChild ? pRelInfo->lpaChild->uiArea : <span style="color: #000000;">0</span> <span style="color: #000000;">)</span>;<br /> hb_itemPutPtr<span style="color: #000000;">(</span> hb_arrayGetItemPtr<span style="color: #000000;">(</span> pItem, UR_RI_NEXT <span style="color: #000000;">)</span>, pRelInfo->lpdbriNext <span style="color: #000000;">)</span>;<br /><br /> <span style="color: #00C800;">return</span> pItem;<br /><span style="color: #000000;">}</span></div>[/code:28snbxc9]
[code=fw:28snbxc9]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #B900B9;">/*<br /> * DBRELINFO<br /> * ---------<br /> * The Relationship Info structure<br /> */</span><br /><br />typedef struct _DBRELINFO<br /><span style="color: #000000;">{</span><br /> PHB_ITEM itmCobExpr; <span style="color: #B900B9;">/* Block representation of the relational SEEK key */</span><br /> PHB_ITEM abKey; <span style="color: #B900B9;">/* String representation of the relational SEEK key */</span><br /> HB_BOOL isScoped; <span style="color: #B900B9;">/* Is this relation scoped */</span><br /> HB_BOOL isOptimized; <span style="color: #B900B9;">/* Is relation optimized */</span><br /> struct _AREA * lpaParent; <span style="color: #B900B9;">/* The parent of this relation */</span><br /> struct _AREA * lpaChild; <span style="color: #B900B9;">/* The parents children */</span><br /> struct _DBRELINFO * lpdbriNext; <span style="color: #B900B9;">/* Next child or parent */</span><br /><span style="color: #000000;">}</span> DBRELINFO;<br /><br />typedef DBRELINFO * LPDBRELINFO;<br /> </div>[/code:28snbxc9]
|
ADO RDD xHarbour
|
Antonio,
[quote:3nrauej3]
2) What shall we put in ADO_INFO :
DBI_FULLPATH
DBI_TABLEEXT
DBI_FILEHANDLE
[/quote:3nrauej3]
FileHandle and TableExt I would set nil to them. For FullPath you may use the database path if defined.
|
ADO RDD xHarbour
|
Antonio,
[quote:1u5v21dx] struct _DBRELINFO * lpdbriNext; /* Next child or parent */[/quote:1u5v21dx]
This always comes empty. Its never used ?
|
ADO RDD xHarbour
|
[quote="lucasdebeltran":3m8khdg6]
Pure Browse() works, but scrolling does not work ok.[/quote:3m8khdg6]
Can you be more precise? Here Browse() works fine.
[quote:3m8khdg6]Append blank fails.[/quote:3m8khdg6]
Why? This has nothing that can be a problem. Can you explain what is the problem?
Here works ok.
[code=fw:3m8khdg6]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">STATIC</span> <span style="color: #00C800;">FUNCTION</span> ADO_APPEND<span style="color: #000000;">(</span> nWA, lUnLockAll <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">LOCAL</span> oRecordSet := USRRDD_AREADATA<span style="color: #000000;">(</span> nWA <span style="color: #000000;">)</span><span style="color: #000000;">[</span> WA_RECORDSET <span style="color: #000000;">]</span><br /> <span style="color: #00C800;">LOCAL</span> aWdata := USRRDD_AREADATA<span style="color: #000000;">(</span> nWA <span style="color: #000000;">)</span><br /> <br /> HB_SYMBOL_UNUSED<span style="color: #000000;">(</span> lUnLockAll <span style="color: #000000;">)</span><br /><br /> oRecordSet:<span style="color: #000000;">AddNew</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> oRecordSet:<span style="color: #0000ff;">Update</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <br /> <span style="color: #00C800;">IF</span> !lUnlockAll<br /> ADO_UNLOCK<span style="color: #000000;">(</span>nWA<span style="color: #000000;">)</span><br /> <span style="color: #00C800;">ENDIF</span> <br /> AADD<span style="color: #000000;">(</span>aWdata<span style="color: #000000;">[</span> WA_LOCKLIST <span style="color: #000000;">]</span>,oRecordSet:<span style="color: #000000;">BookMark</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">RETURN</span> HB_SUCCESS</div>[/code:3m8khdg6]
|
ADO RDD xHarbour
|
[code=fw:1pskll5s]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">(</span> DBSETRELATION <span style="color: #000000;">)</span><br /><span style="color: #000000;">{</span><br /> AREAP pArea = <span style="color: #000000;">(</span> AREAP <span style="color: #000000;">)</span> hb_rddGetCurrentWorkAreaPointer<span style="color: #000000;">(</span><span style="color: #000000;">)</span>;<br /><br /> <span style="color: #00C800;">if</span><span style="color: #000000;">(</span> pArea <span style="color: #000000;">)</span><br /> <span style="color: #000000;">{</span><br /> DBRELINFO dbRelations;<br /> AREAP pChildArea;<br /> HB_AREANO uiChildArea;<br /> char * szAlias = <span style="color: #00C800;">NULL</span>;<br /><br /> <span style="color: #00C800;">if</span><span style="color: #000000;">(</span> hb_pcount<span style="color: #000000;">(</span><span style="color: #000000;">)</span> < <span style="color: #000000;">2</span> ||<br /> hb_param<span style="color: #000000;">(</span> <span style="color: #000000;">1</span>, HB_IT_NUMERIC | HB_IT_STRING <span style="color: #000000;">)</span> == <span style="color: #00C800;">NULL</span> ||<br /> ! <span style="color: #000000;">(</span> HB_ISNIL<span style="color: #000000;">(</span> <span style="color: #000000;">4</span> <span style="color: #000000;">)</span> || HB_ISLOG<span style="color: #000000;">(</span> <span style="color: #000000;">4</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /> <span style="color: #000000;">{</span><br /> hb_errRT_DBCMD<span style="color: #000000;">(</span> EG_ARG, EDBCMD_REL_BADPARAMETER, <span style="color: #00C800;">NULL</span>, HB_ERR_FUNCNAME <span style="color: #000000;">)</span>;<br /> <span style="color: #00C800;">return</span>;<br /> <span style="color: #000000;">}</span><br /><br /> <span style="color: #00C800;">if</span><span style="color: #000000;">(</span> HB_ISNUM<span style="color: #000000;">(</span> <span style="color: #000000;">1</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /> <span style="color: #000000;">{</span><br /> uiChildArea = <span style="color: #000000;">(</span> HB_AREANO <span style="color: #000000;">)</span> hb_parni<span style="color: #000000;">(</span> <span style="color: #000000;">1</span> <span style="color: #000000;">)</span>;<br /> <span style="color: #000000;">}</span><br /> <span style="color: #00C800;">else</span><br /> <span style="color: #000000;">{</span><br /> int iArea = hb_rddGetCurrentWorkAreaNumber<span style="color: #000000;">(</span><span style="color: #000000;">)</span>;<br /><br /> hb_rddSelectWorkAreaAlias<span style="color: #000000;">(</span> hb_parcx<span style="color: #000000;">(</span> <span style="color: #000000;">1</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span>;<br /> <span style="color: #00C800;">if</span><span style="color: #000000;">(</span> hb_vmRequestQuery<span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">return</span>;<br /> uiChildArea = <span style="color: #000000;">(</span> HB_AREANO <span style="color: #000000;">)</span> hb_rddGetCurrentWorkAreaNumber<span style="color: #000000;">(</span><span style="color: #000000;">)</span>;<br /> hb_rddSelectWorkAreaNumber<span style="color: #000000;">(</span> iArea <span style="color: #000000;">)</span>;<br /> <span style="color: #000000;">}</span><br /><br /> pChildArea = uiChildArea ? <span style="color: #000000;">(</span> AREAP <span style="color: #000000;">)</span> hb_rddGetWorkAreaPointer<span style="color: #000000;">(</span> uiChildArea <span style="color: #000000;">)</span> : <span style="color: #00C800;">NULL</span>;<br /><br /> <span style="color: #00C800;">if</span><span style="color: #000000;">(</span> ! pChildArea <span style="color: #000000;">)</span><br /> <span style="color: #000000;">{</span><br /> hb_errRT_BASE<span style="color: #000000;">(</span> EG_NOALIAS, EDBCMD_NOALIAS, <span style="color: #00C800;">NULL</span>, szAlias, <span style="color: #000000;">0</span> <span style="color: #000000;">)</span>;<br /> <span style="color: #00C800;">return</span>;<br /> <span style="color: #000000;">}</span><br /><br /> dbRelations.itmCobExpr = hb_itemNew<span style="color: #000000;">(</span> hb_param<span style="color: #000000;">(</span> <span style="color: #000000;">2</span>, HB_IT_BLOCK <span style="color: #000000;">)</span> <span style="color: #000000;">)</span>;<br /> dbRelations.abKey = hb_itemNew<span style="color: #000000;">(</span> hb_param<span style="color: #000000;">(</span> <span style="color: #000000;">3</span>, HB_IT_STRING <span style="color: #000000;">)</span> <span style="color: #000000;">)</span>;<br /> dbRelations.isScoped = hb_parl<span style="color: #000000;">(</span> <span style="color: #000000;">4</span> <span style="color: #000000;">)</span>;<br /> dbRelations.isOptimized = HB_FALSE;<br /> dbRelations.lpaChild = pChildArea;<br /> dbRelations.lpaParent = pArea;<br /> dbRelations.lpdbriNext = <span style="color: #00C800;">NULL</span>;<br /><br /> SELF_SETREL<span style="color: #000000;">(</span> pArea, &dbRelations <span style="color: #000000;">)</span>;<br /> <span style="color: #000000;">}</span><br /> <span style="color: #00C800;">else</span><br /> hb_errRT_DBCMD<span style="color: #000000;">(</span> EG_NOTABLE, EDBCMD_NOTABLE, <span style="color: #00C800;">NULL</span>, HB_ERR_FUNCNAME <span style="color: #000000;">)</span>;<br /><span style="color: #000000;">}</span></div>[/code:1pskll5s]
|
ADO RDD xHarbour
|
[code=fw:9m413i24]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">static</span> void hb_sxRollBackChild<span style="color: #000000;">(</span> AREAP pArea, PHB_ITEM pItem <span style="color: #000000;">)</span><br /><span style="color: #000000;">{</span><br /> LPDBRELINFO lpdbRelation = pArea->lpdbRelations;<br /><br /> <span style="color: #00C800;">while</span><span style="color: #000000;">(</span> lpdbRelation <span style="color: #000000;">)</span><br /> <span style="color: #000000;">{</span><br /> <span style="color: #00C800;">if</span><span style="color: #000000;">(</span> SELF_INFO<span style="color: #000000;">(</span> lpdbRelation->lpaChild, DBI_ROLLBACK, pItem <span style="color: #000000;">)</span> != HB_SUCCESS <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">break</span>;<br /> hb_sxRollBackChild<span style="color: #000000;">(</span> lpdbRelation->lpaChild, pItem <span style="color: #000000;">)</span>;<br /> lpdbRelation = lpdbRelation->lpdbriNext;<br /> <span style="color: #000000;">}</span><br /><span style="color: #000000;">}</span></div>[/code:9m413i24]
|
ADO RDD xHarbour
|
[code=fw:hyy6gmo8]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">static</span> HB_ERRCODE hb_rddCloseParentRel<span style="color: #000000;">(</span> AREAP pArea, void * pChildArea <span style="color: #000000;">)</span><br /><span style="color: #000000;">{</span><br /> <span style="color: #00C800;">if</span><span style="color: #000000;">(</span> pArea->lpdbRelations <span style="color: #000000;">)</span><br /> <span style="color: #000000;">{</span><br /> LPDBRELINFO * lpdbRelationPtr = &pArea->lpdbRelations;<br /> HB_USHORT uiArea = <span style="color: #000000;">(</span> <span style="color: #000000;">(</span> AREAP <span style="color: #000000;">)</span> pChildArea <span style="color: #000000;">)</span>->uiArea;<br /><br /> <span style="color: #00C800;">do</span><br /> <span style="color: #000000;">{</span><br /> LPDBRELINFO lpdbRelation = *lpdbRelationPtr;<br /><br /> <span style="color: #00C800;">if</span><span style="color: #000000;">(</span> lpdbRelation->lpaChild->uiArea == uiArea <span style="color: #000000;">)</span><br /> <span style="color: #000000;">{</span><br /> <span style="color: #B900B9;">/* Clear this relation */</span><br /> hb_rddSelectWorkAreaNumber<span style="color: #000000;">(</span> lpdbRelation->lpaChild->uiArea <span style="color: #000000;">)</span>;<br /> SELF_CHILDEND<span style="color: #000000;">(</span> lpdbRelation->lpaChild, lpdbRelation <span style="color: #000000;">)</span>;<br /> <span style="color: #00C800;">if</span><span style="color: #000000;">(</span> lpdbRelation->itmCobExpr <span style="color: #000000;">)</span><br /> hb_itemRelease<span style="color: #000000;">(</span> lpdbRelation->itmCobExpr <span style="color: #000000;">)</span>;<br /> <span style="color: #00C800;">if</span><span style="color: #000000;">(</span> lpdbRelation->abKey <span style="color: #000000;">)</span><br /> hb_itemRelease<span style="color: #000000;">(</span> lpdbRelation->abKey <span style="color: #000000;">)</span>;<br /><br /> *lpdbRelationPtr = lpdbRelation->lpdbriNext;<br /> hb_xfree<span style="color: #000000;">(</span> lpdbRelation <span style="color: #000000;">)</span>;<br /> <span style="color: #000000;">}</span><br /> <span style="color: #00C800;">else</span><br /> lpdbRelationPtr = &lpdbRelation->lpdbriNext;<br /> <span style="color: #000000;">}</span><br /> <span style="color: #00C800;">while</span><span style="color: #000000;">(</span> *lpdbRelationPtr <span style="color: #000000;">)</span>;<br /> <span style="color: #000000;">}</span><br /> <span style="color: #00C800;">return</span> HB_SUCCESS;<br /><span style="color: #000000;">}</span></div>[/code:hyy6gmo8]
|
ADO RDD xHarbour
|
Antonio,
In the file c:\harbour\src\rdd\workarea.c it is used many times
|
ADO RDD xHarbour
|
Antonio,
Thanks for the info
Relations are almost finished but I have still some questions about skips
In xHarbour help is mentioned:
[quote:1hblkhg6]Networking: Use SKIP 0 to make changes to a record visible to other work stations while a record is locked. [/quote:1hblkhg6]
This also means that relation should be enforce in this case?
Is Habour the same?
Ive made relations in this way:
If field related is only one :find in childs
Otherwise Select in childs where field1 = and field2 =
To avoid so many calls Im trying to save the last key and if the next its the same doesnt do anything.
Can I use UR_RI_NEXT for this?
|
ADO RDD xHarbour
|
Antonio
[code=fw:2f5i6v50]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">static</span> HB_ERRCODE hb_dbfSkip<span style="color: #000000;">(</span> DBFAREAP pArea, HB_LONG lToSkip <span style="color: #000000;">)</span><br /><span style="color: #000000;">{</span><br /> HB_ERRCODE errCode;<br /><br /> HB_TRACE<span style="color: #000000;">(</span> HB_TR_DEBUG, <span style="color: #000000;">(</span> <span style="color: #ff0000;">"hb_dbfSkip(%p, %ld)"</span>, pArea, lToSkip <span style="color: #000000;">)</span> <span style="color: #000000;">)</span>;<br /><br /> <span style="color: #00C800;">if</span><span style="color: #000000;">(</span> pArea->lpdbPendingRel <span style="color: #000000;">)</span><br /> <span style="color: #000000;">{</span><br /> <span style="color: #00C800;">if</span><span style="color: #000000;">(</span> SELF_FORCEREL<span style="color: #000000;">(</span> &pArea->area <span style="color: #000000;">)</span> != HB_SUCCESS <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">return</span> HB_FAILURE;<br /> <span style="color: #000000;">}</span><br /><br /> pArea->area.fTop = pArea->area.fBottom = HB_FALSE;<br /><br /> <span style="color: #00C800;">if</span><span style="color: #000000;">(</span> lToSkip == <span style="color: #000000;">0</span> || pArea->area.dbfi.itmCobExpr || pArea->area.dbfi.fFilter ||<br /> hb_setGetDeleted<span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">return</span> SUPER_SKIP<span style="color: #000000;">(</span> &pArea->area, lToSkip <span style="color: #000000;">)</span>;<br /><br /> errCode = SELF_SKIPRAW<span style="color: #000000;">(</span> &pArea->area, lToSkip <span style="color: #000000;">)</span>;<br /><br /> <span style="color: #B900B9;">/* TODO: remove this hack - it's not necessary if SKIPRAW works<br /> as it should, Druzus */</span><br /><br /> <span style="color: #B900B9;">/* Move first record and set Bof flag */</span><br /> <span style="color: #00C800;">if</span><span style="color: #000000;">(</span> errCode == HB_SUCCESS && pArea->area.fBof && lToSkip < <span style="color: #000000;">0</span> <span style="color: #000000;">)</span><br /> <span style="color: #000000;">{</span><br /> errCode = SELF_GOTOP<span style="color: #000000;">(</span> &pArea->area <span style="color: #000000;">)</span>;<br /> pArea->area.fBof = HB_TRUE;<br /> <span style="color: #000000;">}</span><br /><br /> <span style="color: #B900B9;">/* Update Bof and Eof flags */</span><br /> <span style="color: #00C800;">if</span><span style="color: #000000;">(</span> lToSkip < <span style="color: #000000;">0</span> <span style="color: #000000;">)</span><br /> pArea->area.fEof = HB_FALSE;<br /> <span style="color: #00C800;">else</span> <span style="color: #B900B9;">/* if( lToSkip > 0 ) */</span><br /> pArea->area.fBof = HB_FALSE;<br /><br /> <span style="color: #00C800;">return</span> errCode;<br /><span style="color: #000000;">}</span></div>[/code:2f5i6v50]
|
ADO RDD xHarbour
|
[code=fw:1qrz2y4l]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#define</span> SUPER_SKIP<span style="color: #000000;">(</span>w, l<span style="color: #000000;">)</span> <span style="color: #000000;">(</span><span style="color: #000000;">(</span>*<span style="color: #000000;">(</span>_SUPERTABLE<span style="color: #000000;">(</span>w<span style="color: #000000;">)</span><span style="color: #000000;">)</span>->skip<span style="color: #000000;">)</span><span style="color: #000000;">(</span>w, l<span style="color: #000000;">)</span><span style="color: #000000;">)</span></div>[/code:1qrz2y4l]
|
ADO RDD xHarbour
|
[quote="Antonio Linares":3k3fdgnh]Antonio,
[code=fw:3k3fdgnh]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #B900B9;">/*<br /> * Select a WorkArea by the number.<br /> */</span><br />HB_ERRCODE hb_rddSelectWorkAreaNumber<span style="color: #000000;">(</span> int iArea <span style="color: #000000;">)</span><br /><span style="color: #000000;">{</span><br /> PHB_STACKRDD pRddInfo;<br /><br /> HB_TRACE<span style="color: #000000;">(</span> HB_TR_DEBUG, <span style="color: #000000;">(</span> <span style="color: #ff0000;">"hb_rddSelectWorkAreaNumber(%d)"</span>, iArea <span style="color: #000000;">)</span> <span style="color: #000000;">)</span>;<br /><br /> pRddInfo = hb_stackRDD<span style="color: #000000;">(</span><span style="color: #000000;">)</span>;<br /> <span style="color: #00C800;">if</span><span style="color: #000000;">(</span> iArea < <span style="color: #000000;">1</span> || iArea > HB_RDD_MAX_AREA_NUM <span style="color: #000000;">)</span><br /> HB_SET_WA<span style="color: #000000;">(</span> <span style="color: #000000;">0</span> <span style="color: #000000;">)</span>;<br /> <span style="color: #00C800;">else</span><br /> HB_SET_WA<span style="color: #000000;">(</span> <span style="color: #000000;">(</span> HB_AREANO <span style="color: #000000;">)</span> iArea <span style="color: #000000;">)</span>;<br /><br /> <span style="color: #00C800;">return</span> <span style="color: #000000;">(</span> pRddInfo->pCurrArea == <span style="color: #00C800;">NULL</span> <span style="color: #000000;">)</span> ? HB_FAILURE : <span style="color: #000000;">HB_SUCCESS</span>;<br /><span style="color: #000000;">}</span></div>[/code:3k3fdgnh]
[code=fw:3k3fdgnh]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#define</span> HB_SET_WA<span style="color: #000000;">(</span> n <span style="color: #000000;">)</span> \<br /> <span style="color: #00C800;">do</span> \<br /> <span style="color: #000000;">{</span> \<br /> pRddInfo->uiCurrArea = n; \<br /> pRddInfo->pCurrArea = <span style="color: #000000;">(</span> <span style="color: #000000;">(</span> pRddInfo->uiCurrArea < pRddInfo->uiWaNumMax <span style="color: #000000;">)</span> ? \<br /> pRddInfo->waList<span style="color: #000000;">[</span> pRddInfo->waNums<span style="color: #000000;">[</span> pRddInfo->uiCurrArea <span style="color: #000000;">]</span> <span style="color: #000000;">]</span> : \<br /> <span style="color: #00C800;">NULL</span> <span style="color: #000000;">)</span>; \<br /> <span style="color: #000000;">}</span> <span style="color: #00C800;">while</span><span style="color: #000000;">(</span> <span style="color: #000000;">0</span> <span style="color: #000000;">)</span></div>[/code:3k3fdgnh][/quote:3k3fdgnh]
How can I catch it in adordd?
This is important because if we have a rel child area with a select where ... when leave parent area and we select the child area we should bring it to the default select to be able to skip freely through açç records otherwise only child records from parent can be skipped!
|
ADO RDD xHarbour
|
[quote="Antonio Linares":1qgxcs6d]Antonio
[code=fw:1qgxcs6d]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">static</span> HB_ERRCODE hb_dbfSkip<span style="color: #000000;">(</span> DBFAREAP pArea, HB_LONG lToSkip <span style="color: #000000;">)</span><br /><span style="color: #000000;">{</span><br /> HB_ERRCODE errCode;<br /><br /> HB_TRACE<span style="color: #000000;">(</span> HB_TR_DEBUG, <span style="color: #000000;">(</span> <span style="color: #ff0000;">"hb_dbfSkip(%p, %ld)"</span>, pArea, lToSkip <span style="color: #000000;">)</span> <span style="color: #000000;">)</span>;<br /><br /> <span style="color: #00C800;">if</span><span style="color: #000000;">(</span> pArea->lpdbPendingRel <span style="color: #000000;">)</span><br /> <span style="color: #000000;">{</span><br /> <span style="color: #00C800;">if</span><span style="color: #000000;">(</span> SELF_FORCEREL<span style="color: #000000;">(</span> &pArea->area <span style="color: #000000;">)</span> != HB_SUCCESS <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">return</span> HB_FAILURE;<br /> <span style="color: #000000;">}</span><br /><br /> pArea->area.fTop = pArea->area.fBottom = HB_FALSE;<br /><br /> <span style="color: #00C800;">if</span><span style="color: #000000;">(</span> lToSkip == <span style="color: #000000;">0</span> || pArea->area.dbfi.itmCobExpr || pArea->area.dbfi.fFilter ||<br /> hb_setGetDeleted<span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">return</span> SUPER_SKIP<span style="color: #000000;">(</span> &pArea->area, lToSkip <span style="color: #000000;">)</span>;<br /><br /> errCode = SELF_SKIPRAW<span style="color: #000000;">(</span> &pArea->area, lToSkip <span style="color: #000000;">)</span>;<br /><br /> <span style="color: #B900B9;">/* TODO: remove this hack - it's not necessary if SKIPRAW works<br /> as it should, Druzus */</span><br /><br /> <span style="color: #B900B9;">/* Move first record and set Bof flag */</span><br /> <span style="color: #00C800;">if</span><span style="color: #000000;">(</span> errCode == HB_SUCCESS && pArea->area.fBof && lToSkip < <span style="color: #000000;">0</span> <span style="color: #000000;">)</span><br /> <span style="color: #000000;">{</span><br /> errCode = SELF_GOTOP<span style="color: #000000;">(</span> &pArea->area <span style="color: #000000;">)</span>;<br /> pArea->area.fBof = HB_TRUE;<br /> <span style="color: #000000;">}</span><br /><br /> <span style="color: #B900B9;">/* Update Bof and Eof flags */</span><br /> <span style="color: #00C800;">if</span><span style="color: #000000;">(</span> lToSkip < <span style="color: #000000;">0</span> <span style="color: #000000;">)</span><br /> pArea->area.fEof = HB_FALSE;<br /> <span style="color: #00C800;">else</span> <span style="color: #B900B9;">/* if( lToSkip > 0 ) */</span><br /> pArea->area.fBof = HB_FALSE;<br /><br /> <span style="color: #00C800;">return</span> errCode;<br /><span style="color: #000000;">}</span></div>[/code:1qgxcs6d][/quote:1qgxcs6d]
What is the diference between skip and skipraw?
The relation is enforced before the actual parent skip?
Can you explain the flow of it?
|
ADO RDD xHarbour
|
Antonio,
Is not DbSelectArea() working by default ?
|
ADO RDD xHarbour
|
[quote="Antonio Linares":2iik3iqw]Antonio,
Is not DbSelectArea() working by default ?[/quote:2iik3iqw]
What do you mean?
What I pretend is to know adordd function is called by it and how can I check if the new selected area is present as child in some relation to reset it to default select..
|
ADO RDD xHarbour
|
Antonio,
For appending and browsing, Recordset should be opened at STATIC FUNCTION ADO_OPEN( nWA, aOpenInfo ) as shown:
[code=fw:3h1rgm9k]<div class="fw" id="{CB}" style="font-family: monospace;"> oRecordSet:<span style="color: #000000;">CursorLocation</span> := adUseClient <span style="color: #B900B9;">//its slower but has avntages such always bookmaks</span><br /> oRecordSet:<span style="color: #000000;">LockType</span> := adLockOptimistic<br /> </div>[/code:3h1rgm9k]
Also, for appending blank, at STATIC FUNCTION ADO_APPEND( nWA, lUnLockAll ), I removed oRecordSet:Update(). Otherwise, it failed.
Mr. Nages would provide more insight than me. But sorce\function\adofuncs.prg show how to deal with ADO safely.
I use Mr. Nages ADO routines at production with no trouble at all.
What RBDMS are you using with your ADORDD.PRG?.
|
ADO RDD xHarbour
|
Lucas,
Regarding cursortype it will be altered after to give the chance to the programer to decide what to use when opening the table.
The adLockPessimistic setting is not supported if the CursorLocation property is set to adUseClient wich might be a problem.
I notice that we need to call :addnew always with fields and values (in blank) and I think then we will not get any more errors.
ADS Probably already next week will try it in real world with MySql and Oracle.
I hope to post today new adordd with relations ready.
Are you trying it with the array of indexes?
Thanks for your feed back
|
ADO RDD xHarbour
|
Antonio,
I advise you to start using asap Access and review adofuncs.prg. Once you had it working with Access, you can easily jump on MSSQL or MySQL, just changing connection strings. I followed that scheme when coding starting from 0 an application using Mr. Nages routines and TDataRow() class, and all went perfect.
No, I haven´t tried indexes already, as to fully test a complete application I need LOCATE FOR, DbSeek(), SET FILTER and OrdSetFocus() to be working, and I think they are not ready yet.
Thank you for your work. Now with latest changes I could issue xBrowse(), but if I set a filter before a blank row is added at top, and also I get some runtime errors with xBrowse when navegating:
Called from: .\source\classes\XBROWSE.PRG => TXBROWSE:GODOWN( 2975 )
Called from: .\source\classes\XBROWSE.PRG => TXBROWSE:KEYDOWN( 2318 )
|
ADO RDD xHarbour
|
Lucas,
[quote:3v6pu8ls]No, I haven´t tried indexes already, as to fully test a complete application I need LOCATE FOR, DbSeek(), SET FILTER and OrdSetFocus() to be working, and I think they are not ready yet.[/quote:3v6pu8ls]
All should be working (check index array) but Ill post in the next hour a new version of adordd already with relations.
Set filter I didnt do anything with it but should work. Check ADO_SETFILTER.
Ill give a try with Access.
I dont use xBrowse in this app but could you be more specific:
[quote:3v6pu8ls]but if I set a filter before a blank row is added at top, and also I get some runtime errors with xBrowse when navegating[/quote:3v6pu8ls]
Is the table empty?
Can you find what is causing the error?
Is the filter expression compatible with what the actual ADO_SETFILTER can do?
Is it a adordd open recset error?
Thanks for your help
|
ADO RDD xHarbour
|
Antonio,
This picture shows the problem:
[img:1sxxx2c8]http://i57.tinypic.com/ip6t1k.png[/img:1sxxx2c8]
There is only one record matching the filter cliteria:
set filter to Lugar = "Barcelona"
But Browse() works fine:
[img:1sxxx2c8]http://i59.tinypic.com/xb0diq.png[/img:1sxxx2c8]
So seems to be a problem with xBrowse´s class and ::BookMark.
Have you tested LOCATE FOR and Seek?.
Thank you
|
ADO RDD xHarbour
|
Hello,
Indexes are failing:
Error description: Error BASE/1132 Error de rango: acceso al array
Args:
[ 1] = A { ... } length: 0
[ 2] = N 0
At, ADO_ORDLSTFOCUS( 1135 ):
here: aOrderInfo[ UR_ORI_RESULT ] := aWAData[ WA_INDEXES ] [aWAData[ WA_INDEXACTIVE ]]
aWAData[ WA_INDEXACTIVE ] := n
ELSE
My code:
[code=fw:18hdm368]<div class="fw" id="{CB}" style="font-family: monospace;"> <span style="color: #0000ff;">SELECT</span><span style="color: #000000;">(</span><span style="color: #ff0000;">"LIBROS"</span><span style="color: #000000;">)</span><br /> LIBROS-><span style="color: #000000;">(</span> dbgotop<span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /><br /> ordsetfocus<span style="color: #000000;">(</span><span style="color: #ff0000;">"LUCAS"</span><span style="color: #000000;">)</span></div>[/code:18hdm368]
[code=fw:18hdm368]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">at</span> <span style="color: #00C800;">FUNCTION</span> ListIndex<span style="color: #000000;">(</span>nOption<span style="color: #000000;">)</span><br /><br /><span style="color: #00C800;">LOCAL</span> Alista_fic:= <span style="color: #000000;">{</span> <span style="color: #000000;">{</span><span style="color: #ff0000;">"CCLIENTE"</span>,<span style="color: #000000;">{</span><span style="color: #ff0000;">"COD_CLI"</span>,<span style="color: #ff0000;">"CODCLIENTE"</span><span style="color: #000000;">}</span>,;<br /> <span style="color: #000000;">{</span><span style="color: #ff0000;">"LIBROS"</span>, <span style="color: #000000;">{</span><span style="color: #ff0000;">"LUCAS"</span>, <span style="color: #ff0000;">"PAIS"</span><span style="color: #000000;">}</span>,;</div>[/code:18hdm368]
|
ADO RDD xHarbour
|
Lucas,
Seek with lSoftseek lLastfind and locate tested. Work.
Seek like dbf is never used unless seek expression corresponds to more than 1 field because we cannt use find.
In this case we use select
Otherwise we use find.
Bookmark its only used in ado_recno to save position.
Seems the array doesnt follow specs please check in adordd for index array
Format is:
{ { tablename, {indexnamea,indexexp}, {indexname2, indexexp} },;
{nexttablename, {nextindexname, indexexp} } }
|
ADO RDD xHarbour
|
Antonio,
Yes, I follow that structure:
[code=fw:1ywjun79]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">LOCAL</span> Alista_fic:= <span style="color: #000000;">{</span> <span style="color: #000000;">{</span> <span style="color: #ff0000;">"LIBROS"</span>, <span style="color: #000000;">{</span><span style="color: #ff0000;">"LIBROS1"</span>, <span style="color: #ff0000;">"TITULO"</span><span style="color: #000000;">}</span> <span style="color: #000000;">}</span> <span style="color: #000000;">}</span></div>[/code:1ywjun79]
|
ADO RDD xHarbour
|
Lucas,
Please place in top ORDLSTFOCUS:
msgselect(aWAData[WA_INDEXES])
msginfo(aWAData[WA_INDEXACTIVE])
what values do you get?
|
ADO RDD xHarbour
|
Hello,
xbrowse(aWAData[WA_INDEXES])
Is empty.
msginfo(aWAData[WA_INDEXACTIVE])
Gives 0.
Thank you
|
ADO RDD xHarbour
|
Lucas,
Did you open the indexes with set index to or ordlistadd.
They are not opened with the table by adordd
They must be opened before ordsetfocus gets called
This is not the normal procedure with ordsetfocus that does nothing if the index
Its a guess
|
ADO RDD xHarbour
|
New adordd with relations and transactions <!-- m --><a class="postlink" href="https://github.com/AHFERREIRA/adordd.git">https://github.com/AHFERREIRA/adordd.git</a><!-- m -->
|
ADO RDD xHarbour
|
Antonio,
No, I didn´t use SET INDEX. Now it Work:
[code=fw:2viqoddy]<div class="fw" id="{CB}" style="font-family: monospace;">SET <span style="color: #0000ff;">INDEX</span> <span style="color: #0000ff;">TO</span> LUCAS1, LUCAS2</div>[/code:2viqoddy]
But there is a bug at OrdSetFocus(). It returns numbers, but it should return the tag name, i.e. LUCAS2.
For example:
[code=fw:2viqoddy]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><br />LUCAS-><span style="color: #000000;">(</span> OrdSetFocus<span style="color: #000000;">(</span><span style="color: #ff0000;">"MYLUCASBIS"</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /><br />Alert<span style="color: #000000;">(</span>OrdSetFocus<span style="color: #000000;">(</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span> shoud <span style="color: #00C800;">return</span> MYLUCASBIS, not a number.<br /><br /><br /> </div>[/code:2viqoddy]
Thank you.
|
ADO RDD xHarbour
|
Lucas,
You re right! Corrected.
Could you please try the following :
dbseek with and without softseek expression = 1 indexkey and expression = 2 or more index keys
set relation and check how is performance.
Locking - Please remember that locks are virtual and arent placed in the files so in fact dont protect others from writing the locked file / record.
This is assured by transactions (new change from last adordd)
Locking only give us the records lock array to allow us to go back to the locks records wihtout disrupt the converted application logic.
First lock everything needs to an update then loop through the lock arrray and replace.
After unlock everything.
Transactions . begintrans with the 1st locks and endtrans with the 1st dbcommit.
For our app logic this works.
Are you coding (all code) in this way?
Is xBrowse running already?
Thanks
|
ADO RDD xHarbour
|
Antonio,
Can you send me the fix for indexes?. Also, have you received my email from yesterday?.
Also, for Harbour users, please add the following code:
at the top of adorrd.prg:
[code=fw:mdabtzvc]<div class="fw" id="{CB}" style="font-family: monospace;"><br />#ifndef __XHARBOUR__<br /><br /> <span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"fivewin.ch"</span> <span style="color: #B900B9;">// as Harbour does not have TRY / CATCH</span><br /> <span style="color: #00D7D7;">#define</span> UR_FI_FLAGS <span style="color: #000000;">6</span><br /> <span style="color: #00D7D7;">#define</span> UR_FI_STEP <span style="color: #000000;">7</span><br /> <span style="color: #00D7D7;">#define</span> UR_FI_SIZE <span style="color: #000000;">5</span> <span style="color: #B900B9;">// by Lucas for Harbour</span><br /><br /><br />#endif<br /><br /><br />ANNOUNCE ADORDD<br /><br /><span style="color: #B900B9;">//THREAD</span><br /><span style="color: #00C800;">STATIC</span> t_cTableName<br /><span style="color: #B900B9;">//THREAD</span></div>[/code:mdabtzvc]
At ado_open():
[code=fw:mdabtzvc]<div class="fw" id="{CB}" style="font-family: monospace;"> <span style="color: #00C800;">FOR</span> n := <span style="color: #000000;">1</span> <span style="color: #0000ff;">TO</span> nTotalFields<br /> <br /> aField := Array<span style="color: #000000;">(</span> UR_FI_SIZE <span style="color: #000000;">)</span><br /> aField<span style="color: #000000;">[</span> UR_FI_NAME <span style="color: #000000;">]</span> := oRecordSet:<span style="color: #000000;">Fields</span><span style="color: #000000;">(</span> n - <span style="color: #000000;">1</span> <span style="color: #000000;">)</span>:<span style="color: #0000ff;">Name</span><br /> aField<span style="color: #000000;">[</span> UR_FI_TYPE <span style="color: #000000;">]</span> := ADO_FIELDSTRUCT<span style="color: #000000;">(</span> oRecordSet, n<span style="color: #000000;">-1</span> <span style="color: #000000;">)</span><span style="color: #000000;">[</span><span style="color: #000000;">7</span><span style="color: #000000;">]</span><br /> aField<span style="color: #000000;">[</span> UR_FI_TYPEEXT <span style="color: #000000;">]</span> := <span style="color: #000000;">0</span><br /> aField<span style="color: #000000;">[</span> UR_FI_LEN <span style="color: #000000;">]</span> := ADO_FIELDSTRUCT<span style="color: #000000;">(</span> oRecordSet, n<span style="color: #000000;">-1</span> <span style="color: #000000;">)</span><span style="color: #000000;">[</span><span style="color: #000000;">3</span><span style="color: #000000;">]</span><br /> aField<span style="color: #000000;">[</span> UR_FI_DEC <span style="color: #000000;">]</span> := ADO_FIELDSTRUCT<span style="color: #000000;">(</span> oRecordSet, n<span style="color: #000000;">-1</span> <span style="color: #000000;">)</span><span style="color: #000000;">[</span><span style="color: #000000;">4</span><span style="color: #000000;">]</span><br /> <br /> #ifdef __XHARBOUR__<br /> aField<span style="color: #000000;">[</span> UR_FI_FLAGS <span style="color: #000000;">]</span> := <span style="color: #000000;">0</span> <span style="color: #B900B9;">// xHarbour expecs this field</span><br /> aField<span style="color: #000000;">[</span> UR_FI_STEP <span style="color: #000000;">]</span> := <span style="color: #000000;">0</span> <span style="color: #B900B9;">// xHarbour expecs this field</span><br /> #endif<br /> <br /> UR_SUPER_ADDFIELD<span style="color: #000000;">(</span> nWA, aField <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">NEXT</span><br /><br /> nResult := UR_SUPER_OPEN<span style="color: #000000;">(</span> nWA, aOpenInfo <span style="color: #000000;">)</span><br /> </div>[/code:mdabtzvc]
at ADO_INFO()
[code=fw:mdabtzvc]<div class="fw" id="{CB}" style="font-family: monospace;"> <span style="color: #00C800;">CASE</span> uInfoType == DBI_FULLPATH <span style="color: #B900B9;">// 10 /* The Full path to the data file */</span><br /><br /> <span style="color: #B900B9;">//MSGINFO("IN SQL FULL PATH DOES NOT MATTER!")</span><br /> uReturn := <span style="color: #ff0000;">""</span><br /> </div>[/code:mdabtzvc]
at ado_append(), remove oRecordSet:Update().
Thank you.
|
ADO RDD xHarbour
|
Lucas,
I just saw your email but couldnt open prg extensions so please send next time with txt extension.
Im finnishing all changes and I l post new version asap.
Thanks
|
ADO RDD xHarbour
|
Posted new version <!-- m --><a class="postlink" href="https://github.com/AHFERREIRA/adordd.git">https://github.com/AHFERREIRA/adordd.git</a><!-- m -->
|
ADO RDD xHarbour
|
Antonio,
Thanks. Resent the email.
Now it works fine with Browse() and OrdSetFocus(), but not with xBrowse().
With xBrowse() I get:
Error description: Error BASE/1074 Error de argumento: <=
Args:
[ 1] = C LIBROS1
[ 2] = N 2
Stack Calls
===========
Called from: lucas2.prg => ADO_ORDINFO( 824 )
Called from: => ORDBAGNAME( 0 )
Called from: .\source\classes\XBROWSE.PRG => TXBROWSE:SETRDD( 4140 )
Called from: .\source\classes\XBROWSE.PRG => XBRWSETDATASOURCE( 13030 )
Called from: .\source\function\XBROWSER.PRG => XBROWSE( 112 )
Called from: lucas2.prg => MAIN( 87 )
ADO_ORDINFO( 824 ) is:
[code=fw:11l8lhoj]<div class="fw" id="{CB}" style="font-family: monospace;"> <span style="color: #00C800;">CASE</span> nIndex == DBOI_BAGNAME<br /><br /> <span style="color: #00C800;">IF</span> ! Empty<span style="color: #000000;">(</span> aWAData<span style="color: #000000;">[</span> WA_INDEXES <span style="color: #000000;">]</span> <span style="color: #000000;">)</span> .AND. ! Empty<span style="color: #000000;">(</span> aOrderInfo<span style="color: #000000;">[</span> UR_ORI_TAG <span style="color: #000000;">]</span> <span style="color: #000000;">)</span> .AND. ;<br /> aOrderInfo<span style="color: #000000;">[</span> UR_ORI_TAG <span style="color: #000000;">]</span> <= LEN<span style="color: #000000;">(</span>aWAData<span style="color: #000000;">[</span> WA_INDEXES <span style="color: #000000;">]</span><span style="color: #000000;">)</span></div>[/code:11l8lhoj]
last line.
\source\classes\XBROWSE.PRG => TXBROWSE:SETRDD( 4140 )
[code=fw:11l8lhoj]<div class="fw" id="{CB}" style="font-family: monospace;"> ::<span style="color: #000000;">aCols</span><span style="color: #000000;">[</span> nFor <span style="color: #000000;">]</span>:<span style="color: #000000;">cOrdBag</span> := <span style="color: #000000;">(</span> cAlias <span style="color: #000000;">)</span>-><span style="color: #000000;">(</span> OrdBagName<span style="color: #000000;">(</span> ::<span style="color: #000000;">aCols</span><span style="color: #000000;">[</span> nFor <span style="color: #000000;">]</span>:<span style="color: #000000;">cSortOrder</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span></div>[/code:11l8lhoj]
Seems that same change applied to OrdSetFocus() should be done to OrdBagName()?.
Thank you.
|
ADO RDD xHarbour
|
Ok it can receive either numeric order or name order.
Done <!-- m --><a class="postlink" href="https://github.com/AHFERREIRA/adordd.git">https://github.com/AHFERREIRA/adordd.git</a><!-- m -->
I ve made some changes Relations are not working anymore will revert soon.
|
ADO RDD xHarbour
|
Hello Antonio,
Thank you. Now xBrowse() seems to work.
However, some changes are required at adordd.prg:
i) You have ANNOUNCE ADORDD twice on top of it.
ii) Also, at ADO_OPEN() you have to comment out:
/*
aOpenInfo[ UR_OI_NAME ] += ".dbf"
hb_adoSetTable( aOpenInfo[ UR_OI_NAME ] )
hb_adoSetEngine( "")
hb_adoSetServer( "")
hb_adoSetQuery( )
hb_adoSetUser( "")
hb_adoSetPassword( "" )
*/
iii) And:
// aWAData[ WA_TABLENAME ] := SUBSTR(CFILENOPATH(aWAData[ WA_TABLENAME ] ),1,LEN(CFILENOPATH(aWAData[ WA_TABLENAME ] ))-4)
iv) Browses requiere mandatory at ADO_OPEN() :
oRecordSet:CursorLocation := adUseClient //its slower but has avntages such always bookmaks
oRecordSet:LockType := adLockOptimistic
Thank you.
|
ADO RDD xHarbour
|
Antonio,
In the LOCATE FOR command, it does not suport those ways:
LOCATE FOR FIELD->NAME ...
or
LOCATE FOR LUCASTABLE->NAME...
Thank you.
|
ADO RDD xHarbour
|
Antonio,
I guess, at ADO_LOCATE(), in aWAData[ WA_SCOPEINFO ][ UR_SI_CFOR ] for the find, all before -> should be ignored, with substr o sttoken.
Thank you.
|
ADO RDD xHarbour
|
Also, to add at ADO_INFO:
[code=fw:6syzs50c]<div class="fw" id="{CB}" style="font-family: monospace;"><br /> <span style="color: #00C800;">CASE</span> uInfoType == DBI_ISREADONLY <span style="color: #B900B9;">// LUCAS</span><br /> uReturn := .F.<br /><br /><br /> </div>[/code:6syzs50c]
Thank you.
|
ADO RDD xHarbour
|
That info about readonly or not is in aWAData, but I don´t know it´s structure.
|
ADO RDD xHarbour
|
Lucas,
[quote="lucasdebeltran":1v9094ab]Antonio,
I guess, at ADO_LOCATE(), in aWAData[ WA_SCOPEINFO ][ UR_SI_CFOR ] for the find, all before -> should be ignored, with substr o sttoken.
Thank you.[/quote:1v9094ab]
The problem its not only this.
We need to know if expression has more than one field mentioned on it.
As I investigate and test :find only allows one mentioned field.
Thus LOCATE FOR field1 = "???" AND field1 = "whatever" its not :find valid so we must send it to filter instead.
Ill change ado_locate to overcome this.
[quote:1v9094ab]DBI_ISREADONLY --> lIsReadOnly (READONLY)
See also: command USE. The return value is .T. (true) when a database file is open in READONLY mode in the current work area.
[/quote:1v9094ab]
We'll have to check open mode and put it here.
Im finishing it. Ill post new version soon.
|
ADO RDD xHarbour
|
Thank you.
Please, don´t forget about:
[quote:g6vdc8wa]
i) You have ANNOUNCE ADORDD twice on top of it.
ii) Also, at ADO_OPEN() you have to comment out:
/*
aOpenInfo[ UR_OI_NAME ] += ".dbf"
hb_adoSetTable( aOpenInfo[ UR_OI_NAME ] )
hb_adoSetEngine( "")
hb_adoSetServer( "")
hb_adoSetQuery( )
hb_adoSetUser( "")
hb_adoSetPassword( "" )
*/
iii) And:
// aWAData[ WA_TABLENAME ] := SUBSTR(CFILENOPATH(aWAData[ WA_TABLENAME ] ),1,LEN(CFILENOPATH(aWAData[ WA_TABLENAME ] ))-4)
iv) Browses requiere mandatory at ADO_OPEN() :
oRecordSet:CursorLocation := adUseClient //its slower but has avntages such always bookmaks
oRecordSet:LockType := adLockOptimistic
[/quote:g6vdc8wa]
|
ADO RDD xHarbour
|
Antonio,
It may be a very good idea if you announce and publish your modified and greatly enhanced adordd.prg version
in the Harbour users group list and also in Harbour devel group list. This way surely you will get more feedback:
[url:3clszfhl]https://groups.google.com/forum/#!forum/harbour-users[/url:3clszfhl]
[url:3clszfhl]https://groups.google.com/forum/#!forum/harbour-devel[/url:3clszfhl]
Also in Facebook in:
[url:3clszfhl]https://www.facebook.com/groups/harbour.project/[/url:3clszfhl]
|
ADO RDD xHarbour
|
Ok Ill do that.
|
ADO RDD xHarbour
|
Antonio, Lucas,
:find wiht more than one field diferent or the same mentioned on the expression its not possible in ADO.
Thus Im going to filter .
Then calling continue will skip through the filter set.
Is this ok for the general use?
|
ADO RDD xHarbour
|
Yes, that´s the only possible way in ADO.
Also, please don´t forget to open indexes automatically.
Antonio L., I think we might wait some days, as adordd.prg need some extra testing.
But, indeed, it´s going to be superb.
|
ADO RDD xHarbour
|
Lucas,
[quote="lucasdebeltran":3c9ohfq3]Yes, that´s the only possible way in ADO.
Also, please don´t forget to open indexes automatically.
Antonio L., I think we might wait some days, as adordd.prg need some extra testing.
But, indeed, it´s going to be superb.[/quote:3c9ohfq3]
What do you mean open indexes automatically?
Thats not in the scope of adordd thats to the application itself isnt it?
Now its working with :filter but thats temporay the final goal its to work with selects. Much more rapid.
Adordd needs much more working and testing.
Please remember that relations arent working, record movement in many situatons can still faill (eofs not tested)
A complete sqlparser for filter expressions although fortunatly we have one already workng many years in this app with ADS but must be adapted.
Creating temporay tables.
Replaces arent yet 100% ok for certain field types.
Memos I didnt even tried.
Im working on relations now.
|
ADO RDD xHarbour
|
Hello,
In DBFCDX, there is not need to call SET INDEX TO..., indexes are opened automatically. Just:
[code=fw:3innc0hh]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><br /> USE <span style="color: #000000;">(</span> cMyPath + <span style="color: #ff0000;">"CUSTOMER.DBF"</span> <span style="color: #000000;">)</span> <span style="color: #00C800;">NEW</span> <span style="color: #0000ff;">ALIAS</span> <span style="color: #ff0000;">"CUST"</span><br /> CUST-><span style="color: #000000;">(</span>OrdSetFocus<span style="color: #000000;">(</span><span style="color: #ff0000;">"CUST1"</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span><br /><br /> </div>[/code:3innc0hh]
Nothing more.
I don´t use relations, and I guess there are not used very often.
I tested basic operations already and they seem to work fine. But the true way to test it is with a complete application, which is going to be my next step.
Also, I suggest you to use ACCESS, instead of ADS. Using Access will arrise the pending issues to be solved. Once ADO Works with Access, it Works with every RBDMS, just changing the connection string.
For correct field managment, please review ADOCreateColSQL().
For deleting, FWAdoDelRecord().
For dates, FW_DateToSQL().
For filtering, FW_Filter2Where().
Thank you.
|
ADO RDD xHarbour
|
New version adordd <!-- m --><a class="postlink" href="https://github.com/AHFERREIRA/adordd.git">https://github.com/AHFERREIRA/adordd.git</a><!-- m -->
Relations working. <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> (I hope)
I think we can even relate tables in 2 different connections ex one MySql another Oracle. Didnt tried yet.
Find works.
If only one field mentioned in the expression calls Find if not Filter
When CONTINUE is called and when is filter skip +1
Seeks working.
Please remember that seeks are truly selects. Thus after a seek the "table" select is left only with the seek results.
If we do another seek or a while seek expression true there isnt any problem however if we try to go to a record saved before the seek will get error.
There is a new aWAData[WA_ISITSUBSET] to control this but I didnt yet find how to know if the default set is needed. For a ex a goto out of the set?
This seems to be a huge problem.
Antonio do you have any idea over the seek problem?
|
ADO RDD xHarbour
|
Lucas,
[quote="lucasdebeltran":8na6mvm8]Hello,
In DBFCDX, there is not need to call SET INDEX TO..., indexes are opened automatically. Just:
[code=fw:8na6mvm8]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><br /> USE <span style="color: #000000;">(</span> cMyPath + <span style="color: #ff0000;">"CUSTOMER.DBF"</span> <span style="color: #000000;">)</span> <span style="color: #00C800;">NEW</span> <span style="color: #0000ff;">ALIAS</span> <span style="color: #ff0000;">"CUST"</span><br /> CUST-><span style="color: #000000;">(</span>OrdSetFocus<span style="color: #000000;">(</span><span style="color: #ff0000;">"CUST1"</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span><br /><br /> </div>[/code:8na6mvm8]
Nothing more.
[/quote:8na6mvm8]
I didn't understand that you meant auto open structural indexes.
You are absolutely right we have to take care of that in adordd.
If you don’t use relations what do you use for ex. to display fields of different "related" workareas?
Thanks for your valuable information
|
ADO RDD xHarbour
|
Antonio,
[quote:2bacaiyq]Antonio do you have any idea over the seek problem?[/quote:2bacaiyq]
Could you provide a example to reproduce it ?
I am not sure which problem you refer to.
|
ADO RDD xHarbour
|
Antonio,
In DBFCDX indexes are created like this way:
[code=fw:9ddbhs2z]<div class="fw" id="{CB}" style="font-family: monospace;"><br /> <br /> <span style="color: #0000ff;">INDEX</span> <span style="color: #0000ff;">ON</span> FIELD->NOMBRE TAG CLIENTES1 <span style="color: #00C800;">FOR</span> !Deleted<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <span style="color: #0000ff;">INDEX</span> <span style="color: #0000ff;">ON</span> FIELD->CODIGO TAG CLIENTES2 <span style="color: #00C800;">FOR</span> !Deleted<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <span style="color: #0000ff;">INDEX</span> <span style="color: #0000ff;">ON</span> FIELD->NIF TAG CLIENTES3 <span style="color: #00C800;">FOR</span> !Deleted<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> DbCloseAll<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /><br /> </div>[/code:9ddbhs2z]
Once they are created, when opening the dbf there is no need to open indexes with SET INDEX TO, they are opened automatically with the USE command:
[quote:9ddbhs2z]
STRUCTURAL BAGs
A structural index is no more than a BAG whose particularity have the same name as the table.
What we gain from this? Is that opening the table to which it is associated, also opens automatically
command economy. It is usually created automatically with:
USE MyDatabase New
INDEX ON TAG TO FILE NAME = TABLE´S NAME
....
Also:
SET AUTOPEN
Toggles automatic opening of a structural index file.
Syntax
SET AUTOPEN ON | off | (<lOnOff>)
Arguments
ON | off | (<lOnOff>)
The option toggles if a structural index file is automatically opened with the USE command. With ON or .T. (true), an index file is automatically opened. OFF or .F. (false) switch this mode off. Description
Some replaceable database drivers support automatic opening of index files with the USE command when the index file has the same file name as the database file (without extension). An example is the DBFCDX driver. SET AUTOPEN toggles this behavior.
When SET AUTOPEN is set to ON, which is the default, the USE command automatically opens an index file having the same name as the database file and the file extension returned from OrdBagExt().
Note: if an index file is automatically opened, a controlling index is not activated. The default index order is zero, i.e. records are accessible in physical order in the work area. To select a controlling index, call OrdSetFocus() or use SET AUTORDER for a default controlling index.
Info
[/quote:9ddbhs2z]
|
ADO RDD xHarbour
|
Antonio,
use something = select * from ....
browse() // you will see all records
nreg := recno()
seek whatever = select * from .... where (seek expression)
browse() //you will only see the seek matching record(s)
go to nreg //this doesnt exist anymore
You will see what I mean.
Dont forget this only happens if seek expression corresponds to more than 1 index field!
|
ADO RDD xHarbour
|
Lucas,
The app Im converting does not use structural indexes so I didn't foresee it
But lets see:
The name of the index in the array is the name of the tag of the struct index file right?
This approach didn't foresee to keep the struct file name index and it might not be needed.
You simply ask for the orders (tags) right?
The struct file name itself is not needed ?
The only thing we need is to open all indexes with the table if SET AUTO OPEN is true and place the current order accordingly to SET AUTORDER. Right?
Antonio how can I query these values ?
|
ADO RDD xHarbour
|
Lucas,
[quote:2hamvzqn]If you don’t use relations what do you use for ex. to display fields of different "related" workareas?[/quote:2hamvzqn]
Please clarify this.
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.