ADO RDD xHarbour
Re: ADO RDD xHarbour
Antonio,
I dont have incremental search in my xbrowse.
Could email me only that function?
I dont have incremental search in my xbrowse.
Could email me only that function?
Regards
Antonio H Ferreira
Antonio H Ferreira
- lucasdebeltran
- Posts: 1303
- Joined: Tue Jul 21, 2009 8:12 am
- Contact:
Re: ADO RDD xHarbour
Antonio,
So APPEND BLANK and REPLACE FIELD WITH.. do not work already?.
Thank you.
So APPEND BLANK and REPLACE FIELD WITH.. do not work already?.
Thank you.
Muchas gracias. Many thanks.
Un saludo, Best regards,
Harbour 3.2.0dev, Borland C++ 5.82 y FWH 13.06 [producción]
Implementando MSVC 2010, FWH64 y ADO.
Abandonando uso xHarbour y SQLRDD.
Un saludo, Best regards,
Harbour 3.2.0dev, Borland C++ 5.82 y FWH 13.06 [producción]
Implementando MSVC 2010, FWH64 y ADO.
Abandonando uso xHarbour y SQLRDD.
Re: ADO RDD xHarbour
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.
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.
Regards
Antonio H Ferreira
Antonio H Ferreira
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Re: ADO RDD xHarbour
Antonio,
I just sent an email to Rao asking him for the code to provide you
I just sent an email to Rao asking him for the code to provide you
- lucasdebeltran
- Posts: 1303
- Joined: Tue Jul 21, 2009 8:12 am
- Contact:
Re: 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'
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'
Muchas gracias. Many thanks.
Un saludo, Best regards,
Harbour 3.2.0dev, Borland C++ 5.82 y FWH 13.06 [producción]
Implementando MSVC 2010, FWH64 y ADO.
Abandonando uso xHarbour y SQLRDD.
Un saludo, Best regards,
Harbour 3.2.0dev, Borland C++ 5.82 y FWH 13.06 [producción]
Implementando MSVC 2010, FWH64 y ADO.
Abandonando uso xHarbour y SQLRDD.
Re: ADO RDD xHarbour
Lucas,
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.
I dont know if its only in xHarbour
These in xHarbour must be added to hbusrrd.chlucas.prg(331) Warning W0001 Ambiguous reference 'UR_FI_FLAGS'
lucas.prg(332) Warning W0001 Ambiguous reference 'UR_FI_STEP'
Code: Select all
#define UR_FI_FLAGS 6
#define UR_FI_STEP 7
#define UR_FI_SIZE 7 //eram 5 ahf
All others Im correcting code I ll post it later. Nevertheless you should be able to run like that.
Code: Select all
IF UPPER(SUBSTR(cOrder,1,3)) IN aTempFiles .OR. UPPER(SUBSTR(cOrder,1,4)) IN aTempFiles
Regards
Antonio H Ferreira
Antonio H Ferreira
- lucasdebeltran
- Posts: 1303
- Joined: Tue Jul 21, 2009 8:12 am
- Contact:
Re: ADO RDD xHarbour
Antonio,
IF UPPER(SUBSTR(cOrder,1,3)) IN aTempFiles .OR. UPPER(SUBSTR(cOrder,1,4)) IN aTempFiles
this only works with xHarbour.
I advise you not to code like this, as Harbour users, the majority, won´t be able to try and test it.
With your latest additions it only gives the above error.
Thank you.
IF UPPER(SUBSTR(cOrder,1,3)) IN aTempFiles .OR. UPPER(SUBSTR(cOrder,1,4)) IN aTempFiles
this only works with xHarbour.
I advise you not to code like this, as Harbour users, the majority, won´t be able to try and test it.
With your latest additions it only gives the above error.
Thank you.
Muchas gracias. Many thanks.
Un saludo, Best regards,
Harbour 3.2.0dev, Borland C++ 5.82 y FWH 13.06 [producción]
Implementando MSVC 2010, FWH64 y ADO.
Abandonando uso xHarbour y SQLRDD.
Un saludo, Best regards,
Harbour 3.2.0dev, Borland C++ 5.82 y FWH 13.06 [producción]
Implementando MSVC 2010, FWH64 y ADO.
Abandonando uso xHarbour y SQLRDD.
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Re: ADO RDD xHarbour
Antonio,
Yes, please, code it compatible for both harbour and xharbour, thanks
Yes, please, code it compatible for both harbour and xharbour, thanks
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Re: ADO RDD xHarbour
Antonio,
I have emailed you the code you asked for
I have emailed you the code you asked for
Re: ADO RDD xHarbour
You re right Ill do that.
Thanks for the code Antonio.
Thanks for the code Antonio.
Regards
Antonio H Ferreira
Antonio H Ferreira
- lucasdebeltran
- Posts: 1303
- Joined: Tue Jul 21, 2009 8:12 am
- Contact:
Re: ADO RDD xHarbour
Master Antonio Linares,
In order to help Antonio, what is the equivalent in Harbour for IF xxxx IN aTempFiles?.
Thanks.
In order to help Antonio, what is the equivalent in Harbour for IF xxxx IN aTempFiles?.
Thanks.
Muchas gracias. Many thanks.
Un saludo, Best regards,
Harbour 3.2.0dev, Borland C++ 5.82 y FWH 13.06 [producción]
Implementando MSVC 2010, FWH64 y ADO.
Abandonando uso xHarbour y SQLRDD.
Un saludo, Best regards,
Harbour 3.2.0dev, Borland C++ 5.82 y FWH 13.06 [producción]
Implementando MSVC 2010, FWH64 y ADO.
Abandonando uso xHarbour y SQLRDD.
Re: ADO RDD xHarbour
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?
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: Select all
STATIC FUNCTION ADOSCOPE(aWAdata, oRecordSet, aOrderInfo,nIndex)
LOCAL y, cScopeExp :="", cSql :=""
//[UR_ORI_NEWVAL] comes with actual scope top or bottom and returns the former active scope if any
IF VALTYPE(aOrderInfo[ UR_ORI_NEWVAL ]) = "B"
aOrderInfo[ UR_ORI_NEWVAL ] := EVAL(aOrderInfo[ UR_ORI_NEWVAL ])
ENDIF
IF EMPTY(aWAdata[WA_INDEXACTIVE]) .OR. aWAdata[WA_INDEXACTIVE] = 0 //NO INDEX NO SCOPE
aOrderInfo[ UR_ORI_RESULT ] := NIL
RETURN HB_FAILURE
ENDIF
y:=ASCAN( aWAData[ WA_SCOPES ], aWAData[WA_INDEXACTIVE] )
DO CASE
CASE nIndex == DBOI_SCOPESET //never gets called noy tested might be completly wrong!
IF y > 0
aWAData[ WA_SCOPETOP ][y] := aOrderInfo[ UR_ORI_NEWVAL ]
aWAData[ WA_SCOPEBOT ][y] := aOrderInfo[ UR_ORI_NEWVAL ]
ELSE
AADD( aWAData[ WA_SCOPES ],aWAData[ WA_INDEXACTIVE ])
AADD(aWAData[ WA_SCOPETOP ],aOrderInfo[ UR_ORI_NEWVAL ])
AADD(aWAData[ WA_SCOPEBOT ],aOrderInfo[ UR_ORI_NEWVAL ])
ENDIF
aOrderInfo[ UR_ORI_RESULT ] := NIL
CASE nIndex == DBOI_SCOPECLEAR //never gets called noy tested might be completly wrong!
IF y > 0
ADEL(aWAData[ WA_SCOPES ],y,.T.)
ADEL(aWAData[ WA_SCOPETOP ],y,.T.)
ADEL(aWAData[ WA_SCOPEBOT ],y,.T.)
ENDIF
aOrderInfo[ UR_ORI_RESULT ] := NIL //RETURN ACUTAL SCOPETOP NIL IF NONE
CASE nIndex == DBOI_SCOPETOP
IF y > 0
aOrderInfo[ UR_ORI_RESULT ] := aWAData[ WA_SCOPETOP ][y] //RETURN ACTUALSCOPE TOP
aWAData[ WA_SCOPETOP ][y] := aOrderInfo[ UR_ORI_NEWVAL ]
IF LEN(aWAData[ WA_SCOPEBOT ]) < y
AADD(aWAData[ WA_SCOPEBOT ],SPACE(LEN(CVALTOCHAR(aWAData[ WA_SCOPETOP ][y])))) //THERE INST STILL A SCOPEBOT ARRAYS MUST HAVE SAME LEN
ENDIF
ELSE
AADD(aWAData[ WA_SCOPETOP ],aOrderInfo[ UR_ORI_NEWVAL ])
AADD(aWAData[ WA_SCOPEBOT ],SPACE(LEN(CVALTOCHAR(aWAData[ WA_SCOPETOP ][1])))) //THERE INST STILL A SCOPEBOT ARRAYS MUST HAVE SAME LEN
aOrderInfo[ UR_ORI_RESULT ] := ""
ENDIF
CASE nIndex == DBOI_SCOPEBOTTOM
IF y > 0
aOrderInfo[ UR_ORI_RESULT ] := aWAData[ WA_SCOPEBOT ][y] //RETURN ACTUALSCOPE TOP
aWAData[ WA_SCOPEBOT ][y] := aOrderInfo[ UR_ORI_NEWVAL ]
IF LEN(aWAData[ WA_SCOPETOP ]) < y
AADD(aWAData[ WA_SCOPETOP ],SPACE(LEN(CVALTOCHAR(aWAData[ WA_SCOPEBOT ][y])))) //THERE INST STILL A SCOPETOP ARRAYS MUST HAVE SAME LEN
ENDIF
ELSE
AADD( aWAData[ WA_SCOPES ],aWAData[ WA_INDEXACTIVE ])
AADD(aWAData[ WA_SCOPEBOT ],aOrderInfo[ UR_ORI_NEWVAL ])
AADD(aWAData[ WA_SCOPETOP ],SPACE(LEN(CVALTOCHAR(aWAData[ WA_SCOPEBOT ][1])))) //THERE INST STILL A SCOPETOP ARRAYS MUST HAVE SAME LEN
aOrderInfo[ UR_ORI_RESULT ] := ""
ENDIF
CASE nIndex == DBOI_SCOPETOPCLEAR
IF y > 0
aOrderInfo[ UR_ORI_RESULT ] := aWAData[ WA_SCOPETOP ][y] //RETURN ACTUALSCOPE TOP
aWAData[ WA_SCOPETOP ][y] := SPACE(LEN(CVALTOCHAR(aWAData[ WA_SCOPEBOT ][y])))
ELSE
aOrderInfo[ UR_ORI_RESULT ] := "" //RETURN ACTUALSCOPE TOP IF NONE
ENDIF
CASE nIndex == DBOI_SCOPEBOTTOMCLEAR
IF y > 0
aOrderInfo[ UR_ORI_RESULT ] := aWAData[ WA_SCOPEBOT ][y] //RETURN ACTUALSCOPE TOP
aWAData[ WA_SCOPEBOT ][y] := SPACE(LEN(CVALTOCHAR(aWAData[ WA_SCOPETOP ][y])))
ELSE
aOrderInfo[ UR_ORI_RESULT ] := "" //RETURN ACTUALSCOPE TOP IF NONE
ENDIF
ENDCASE
//ONLY BUILDS QUERY AFTER ALL DONE ASSUME THAT ALWAYS CLLED IN PAIRS OTHERWISE WILL GET ERROR
IF nIndex = DBOI_SCOPEBOTTOM .OR. nIndex = DBOI_SCOPEBOTTOMCLEAR .OR. nIndex = DBOI_SCOPETOPCLEAR
IF y = 0 //IF DIDNT FOUND ANY ITS THE FIRST ONE THAT JUST BEEN ADD
y := 1
ENDIF
IF LEN(ALLTRIM(aWAData[ WA_SCOPETOP ][y]+aWAData[ WA_SCOPEBOT ][y])) > 0
cScopeEXp := ADOPSEUDOSEEK(aWAData[ WA_SCOPETOP ][y],aWAData,,.T.,aWAData[ WA_SCOPEBOT ][y])[2]
ELSE
cScopeExp :=""
ENDIF
cSql := IndexBuildExp(aWAData[ WA_INDEXACTIVE ],aWAData,,cScopeExp)
oRecordSet:Close()
oRecordSet:open(cSql,aWAData[ WA_CONNECTION ])
ENDIF
RETURN HB_SUCCESS
Regards
Antonio H Ferreira
Antonio H Ferreira
Re: ADO RDD xHarbour
New adordd with scopes and Harbour syntax https://github.com/AHFERREIRA/adordd.git
Regards
Antonio H Ferreira
Antonio H Ferreira
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Re: ADO RDD xHarbour
Antonio,
Excellent! Great work
Now we need feedback from users. How is your app behaving with it ?
Excellent! Great work
Now we need feedback from users. How is your app behaving with it ?