ADO RDD xHarbour
- nageswaragunupudi
- Posts: 8017
- Joined: Sun Nov 19, 2006 5:22 am
- Location: India
- Contact:
Re: ADO RDD xHarbour
FW_ValToSQL( anyvalue ) in adofuncs.prg
may also be seen
I suggest there is no need to reinvent anything.
may also be seen
I suggest there is no need to reinvent anything.
Regards
G. N. Rao.
Hyderabad, India
G. N. Rao.
Hyderabad, India
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Re: ADO RDD xHarbour
Dear Rao,
With your help and ADO expertise, AdoRdd can turn into a great tool
Many thanks for joining this thread
With your help and ADO expertise, AdoRdd can turn into a great tool
Many thanks for joining this thread
Re: ADO RDD xHarbour
Great help! Thanks Mr. Rao!
Can you post those functions here as I dont have them?
Im working on Seeks transforming it into :find or SELECT as one or more fields present in the expression.
Im stucked in a problem when we use lSoftSeek.
Do you have any idea how to emulate that with Sql?
Can you post those functions here as I dont have them?
Im working on Seeks transforming it into :find or SELECT as one or more fields present in the expression.
Im stucked in a problem when we use lSoftSeek.
Do you have any idea how to emulate that with Sql?
Regards
Antonio H Ferreira
Antonio H Ferreira
- nageswaragunupudi
- Posts: 8017
- Joined: Sun Nov 19, 2006 5:22 am
- Location: India
- Contact:
Re: ADO RDD xHarbour
We can implement Seeks and Locates using Ado Find.
Limitations are that Find works with only one field.
You may examine XBrowse incremental seek for ado for the logic.
For seek we may use
FLDNAME LIKE <cseek>* (char)
FLDNAME = <cseek> (other)
Softseek
FLDNAME >= <cseek>
I hope you are using FWH, you can refer to xbrowse.prg for implementation of seek
and adofuncs.prg for the functions I referred to in earlier post
Limitations are that Find works with only one field.
You may examine XBrowse incremental seek for ado for the logic.
For seek we may use
FLDNAME LIKE <cseek>* (char)
FLDNAME = <cseek> (other)
Softseek
FLDNAME >= <cseek>
I hope you are using FWH, you can refer to xbrowse.prg for implementation of seek
and adofuncs.prg for the functions I referred to in earlier post
Regards
G. N. Rao.
Hyderabad, India
G. N. Rao.
Hyderabad, India
Re: ADO RDD xHarbour
Antonio,
I dont have those ado functions can you send the file to me ?
You can download adordd from https://github.com/AHFERREIRA/adordd.git
Set rdd to adordd
Add your index files to ListIndex() accordingly to the specs.
All temp name index files must be present in ListTmpNames() "TMP","TEMP"
Ready:
Open
Close
Indexes
Locks
Navigation
Find
dbinfo
ordinfo
Seek (without lSoftSeek)
I dont have those ado functions can you send the file to me ?
You can download adordd from https://github.com/AHFERREIRA/adordd.git
Set rdd to adordd
Add your index files to ListIndex() accordingly to the specs.
All temp name index files must be present in ListTmpNames() "TMP","TEMP"
Ready:
Open
Close
Indexes
Locks
Navigation
Find
dbinfo
ordinfo
Seek (without lSoftSeek)
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,
Already sent to your email
many thanks for sharing it
you are doing a great work, hopefully it gets completed very soon!
Already sent to your email
many thanks for sharing it
you are doing a great work, hopefully it gets completed very soon!
- lucasdebeltran
- Posts: 1303
- Joined: Tue Jul 21, 2009 8:12 am
- Contact:
Re: ADO RDD xHarbour
Antonio,
Very great news!!.
When the code is mature, please tell me to test it with a real application.
Thank you very much,
Very great news!!.
When the code is mature, please tell me to test it with a real application.
Thank you very much,
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,
Thanks Ill do that.
But you can try it already.
See adordd.prg and adordd.ch (only locates need to be redefined)
You need to fill the index array with your indexes and thats it.
Relations, Set scopes are undergoing.
You will understand the approach and see how it works for you.
Thanks Ill do that.
But you can try it already.
See adordd.prg and adordd.ch (only locates need to be redefined)
You need to fill the index array with your indexes and thats it.
Relations, Set scopes are undergoing.
You will understand the approach and see how it works for you.
Regards
Antonio H Ferreira
Antonio H Ferreira
Re: ADO RDD xHarbour
Antonio,
Im finishing Set Scopes.
What is the normal behaviour?
The scope if not cleared it remains with the index athough we change orders?
I mean :
Please resend also the requested functions see my email.
Im finishing Set Scopes.
What is the normal behaviour?
The scope if not cleared it remains with the index athough we change orders?
I mean :
Code: Select all
sele 0
use xtable
set index to index1,index2
set order to index1
set scope to exp1,exp2
browse() //with scope
set order to index2
Browse() //wihtout scope
set order to index1
browse() // the scope becomes active or not?
Regards
Antonio H Ferreira
Antonio H Ferreira
- lucasdebeltran
- Posts: 1303
- Joined: Tue Jul 21, 2009 8:12 am
- Contact:
Re: ADO RDD xHarbour
Antonio,
I am sorry but I don´t understand what you said about indexes.
Can yo please be more specific?.
Also, have you modified original adordd.ch?.
In my previous tests, this is a sample I tested:
I am sorry but I don´t understand what you said about indexes.
Can yo please be more specific?.
Also, have you modified original adordd.ch?.
In my previous tests, this is a sample I tested:
Code: Select all
#include "adordd.ch"
#include "adordd.prg"
#include "FiveWin.ch"
REQUEST ADORDD
function Main()
USE dolphin_man VIA "ADORDD" TABLE "clientes" MYSQL ;
FROM "dolphintest.sitasoft.net" ;
USER "test_dolphin" ;
PASSWORD "123456" ;
ALIAS "DEMO"
SELECT("DEMO")
MSGALERT(ALIAS(), RECNO())
DEMO->( dbgotop() )
xbrowse()
APPEND BLANK
REPLACE FIELD->NOME WITH "LUCAS DE BELTRAN"
REPLACE FIELD->EMAIL WITH "NOSPAM@GMAIL.COM"
DBGOTOP()
xBrowse()
USE
return nil
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,
The adordd us being altered in order to keep the same dbf app logic applied to any source data.
Saying that the indexes in the adordd are virtual as they dont exist as files! (see adordd ordlstadd, orslstfocus and listindex )
In fact the indexes are selects order by the defined "index order" in the indexes array so that one can continue to use the same exactly the same syntax as before without SQL.
If you dont have indexes your tests for you the adordd its like before.
See adordd to understand what I mean.
My goal its to achieve total 100% dbf syntax with any data source thus using adordd without changing any code. (I know with some performanc degradation but its impossible otherwise)
Please comment the following lines in ado_open() and ty it.
hb_adoSetEngine( "")
hb_adoSetServer( "")
hb_adoSetQuery( )
hb_adoSetUser( "")
hb_adoSetPassword( "" )
Im using this for my testings only.
The adordd us being altered in order to keep the same dbf app logic applied to any source data.
Saying that the indexes in the adordd are virtual as they dont exist as files! (see adordd ordlstadd, orslstfocus and listindex )
In fact the indexes are selects order by the defined "index order" in the indexes array so that one can continue to use the same exactly the same syntax as before without SQL.
If you dont have indexes your tests for you the adordd its like before.
See adordd to understand what I mean.
My goal its to achieve total 100% dbf syntax with any data source thus using adordd without changing any code. (I know with some performanc degradation but its impossible otherwise)
Please comment the following lines in ado_open() and ty it.
hb_adoSetEngine( "")
hb_adoSetServer( "")
hb_adoSetQuery( )
hb_adoSetUser( "")
hb_adoSetPassword( "" )
Im using this for my testings only.
Regards
Antonio H Ferreira
Antonio H Ferreira
- lucasdebeltran
- Posts: 1303
- Joined: Tue Jul 21, 2009 8:12 am
- Contact:
Re: ADO RDD xHarbour
Hello,
I would like to test with indexes, because that was the only lack in adordd.prg provided within Harbour.
I also use ordsetfocus(), i e:
Thank you.
I would like to test with indexes, because that was the only lack in adordd.prg provided within Harbour.
I also use ordsetfocus(), i e:
Code: Select all
CLIENTES->( OrdSetFocus("CLIENTES1") )
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,
Go to ListIndex in adordd and add to the index array wahtever you want respecting the aray spec:
{ {"TABLENAME",{"INDEXNAME","INDEXKEY","WHERE EXPRESSION AS USED FOR FOREXPRESSION","UNIQUE - DISTINCT ANY SQL STAT BEFORE * FROM"} }
ex.
{{"CLIENTES1",{"PAISCLIENTE","WHERE PAISCLIENTE = ' BRASIL'", "DISTINCT"}}
its equal to INDEX PAISCLIENTE FOR PAISCLIENTE = ' BRASIL' UNIQUE
If you see that the order its not like before just adjust the index expression for sql in the index array.
When you create an index its always considered temporary only exist during the application runtime.
In this case adordd checks the temp names in the ListTmpNames. If your temp name doesnt start with any of those you will get after a ors:open error.
But if you want you can add your your temp names to that array. Please remember that only its checkeed for the temp names till 4th position in the name.
Here you dont need to ave the expressions because ordecreate will supply them to adordd thatsaves them.
Thats it
Go to ListIndex in adordd and add to the index array wahtever you want respecting the aray spec:
{ {"TABLENAME",{"INDEXNAME","INDEXKEY","WHERE EXPRESSION AS USED FOR FOREXPRESSION","UNIQUE - DISTINCT ANY SQL STAT BEFORE * FROM"} }
ex.
{{"CLIENTES1",{"PAISCLIENTE","WHERE PAISCLIENTE = ' BRASIL'", "DISTINCT"}}
its equal to INDEX PAISCLIENTE FOR PAISCLIENTE = ' BRASIL' UNIQUE
If you see that the order its not like before just adjust the index expression for sql in the index array.
When you create an index its always considered temporary only exist during the application runtime.
In this case adordd checks the temp names in the ListTmpNames. If your temp name doesnt start with any of those you will get after a ors:open error.
But if you want you can add your your temp names to that array. Please remember that only its checkeed for the temp names till 4th position in the name.
Here you dont need to ave the expressions because ordecreate will supply them to adordd thatsaves them.
Thats it
Regards
Antonio H Ferreira
Antonio H Ferreira
- lucasdebeltran
- Posts: 1303
- Joined: Tue Jul 21, 2009 8:12 am
- Contact:
Re: ADO RDD xHarbour
Thank you.
In your git there is no adordd.ch:
In your git there is no adordd.ch:
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
Lucas,
Antonio do need feedback so you are very welcome to this thread
Thanks for testing and helping Antonio!
Antonio do need feedback so you are very welcome to this thread
Thanks for testing and helping Antonio!